Java Create Window

[Solved] Java Create Window | Java - Code Explorer | yomemimo.com
Question : java create window

Answered by : not-prepared-to-release-that

//THIS IS A FIX OF THE ONE BY FRANCY FROG
//THEY FIXED THEIRS
import javax.swing.JFrame;
public class example { public static void main(String[] args){ JFrame frame = new JFrame(); frame.setSize(100,100); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setTitle("Example Frame"); frame.setVisible(true); }
}

Source : | Last Update : Thu, 28 May 20

Question : java create jframe

Answered by : fancy-frog-oss3fdhtoqlo

import javax.swing.JFrame;
public class example { public static void main(String[] args){ JFrame frame = new JFrame(); frame.setSize(100,100); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOES); frame.setTitle("Example Frame"); frame.setVisible(true); }
}

Source : | Last Update : Fri, 24 Apr 20

Question : how to make window in java

Answered by : vscoder

//It is easy
//Don't forget to mention package or it will cause error
import javax.swing.*;
public class coder83 { public static void main(String[] args){ JFrame firstFrame = new JFrame();
//x and y are your wish firstFrame.setsize(y,x); firstFrame.setTitle("Coder83");
//It is important or else your window won't clode firstFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); firstFrame.setVisible(true); }} 

Source : | Last Update : Wed, 23 Mar 22

Question : java create window

Answered by : xenophobic-xenomorph-emdno4lfddrc

public interface WindowConfigurer { void configure(JFrame window);
}
public class DefaultWindowConfigurer implements WindowConfigurer { private Font font = // Default font public void configure(JFrame window) { window.setFont(font); } public void setFont(Font font) { this.font = font; }
}
public class EntryPoint { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { Something something = new Something(); WindowConfigurer windowConfigurer = new DefaultWindowConfigurer(); windowConfigurer.configure(something); something.setVisible(true); } }); }
}
public class Something extends JFrame { public Something() { // .. add buttons, controls, etc. }
}

Source : https://nullorempty.org/questions/31482986/Creating-a-window-with-Java-Swing | Last Update : Mon, 28 Feb 22

Answers related to java create window

Code Explorer Popular Question For Java