//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);
}
}
//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);
}
}
//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);
}}
//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);
}}
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.
}
}
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.
}
}