Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package gui;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- public class MainScreen extends JFrame
- {
- public MainScreen() throws IOException
- {
- ....
- this.pack();
- this.setVisible(true);
- }
- }
- public static void main(String[] args)
- {
- //avoid blocking the main thread
- SwingUtilities.invokeLater(new Runnable(){
- @Override
- public void run() {
- try {
- new MainScreen();
- } catch (IOException e) {
- e.printStackTrace();
- };
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement