|
@ -19,8 +19,19 @@ public class Main { |
|
|
main.setBounds(300, 200, 500, 500); |
|
|
main.setBounds(300, 200, 500, 500); |
|
|
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
|
|
|
|
|
|
|
|
JPanel rootPanel = new JPanel(); |
|
|
|
|
|
rootPanel.setVisible(true); |
|
|
|
|
|
rootPanel.setBounds(0, 0, 500, 500); |
|
|
|
|
|
rootPanel.setBackground(Color.LIGHT_GRAY); |
|
|
|
|
|
rootPanel.setLayout(null); |
|
|
|
|
|
|
|
|
|
|
|
main.setContentPane(rootPanel); |
|
|
|
|
|
|
|
|
|
|
|
JButton back = new JButton(); |
|
|
|
|
|
back.setVisible(true); |
|
|
|
|
|
back.setBounds(5, 5, 100, 25); |
|
|
|
|
|
rootPanel.add(back); |
|
|
|
|
|
back.setText("Back"); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|