I have followed thenewbostons java game tutorials on youtube and managed to create a base class which will be in full screen mode using a screenmanager class. Well all works just fine, I can draw images and strings and so on, but how the heck can I add JButtons etc etc.
I have uploaded my code on pastie.org so you can see it 🙂
consider following code :
import javax.swing.JButton;
import javax.swing.JFrame;public class NewClass5 extends JFrame{JButton b=new JButton("button");NewClass5(){this.add(b);this.setSize(200, 200);this.setVisible(true);}public static void main(String a[]){new NewClass5();}}