According to your question, which is not very informative.
A little guideance:
1. you need a class
e.g.
public class MyApp ()
{
}
2. main method for starting
public class MyApp ()
{
public static void main(String args[])
{
}
}
3. a Frame, without a Frame there will be nothing !
public class MyApp ()
{
JFrame myFrame;
public static void main(String args[])
{
}
}
4. constructor for the app and init in it
public class MyApp ()
{
JFrame myFrame;
public static void main(String args[])
{
new myApp();
}
public MyApp()
{
myFrame = new JFrame("MyApp");
}
}
5. A button and a wait Operation and the window size
public class MyApp ()
{
JFrame myFrame;
public static void main(String args[])
{
new myApp();
while(System.out.readln())
{
}
}
public MyApp()
{
myFrame = new JFrame("MyApp");
myFrame.setPreferredSize(new Dimension(800,600));
Button myButton = new Button("Button");
myFrame.add(button);
myFrame.setVisible(true);
button.setVisible(true);
}
}
If i missed nothing, i actually had no Java IDE at Hand,
this code should work and Display a Screen with a button.
hope this is what you'd asked :)