Results 1 to 4 of 4
Thread: JButton in JApplet
-
JButton in JApplet
i'm trying to add a JButton to my JApplet.
the JButton should be set to an absolute position, but it doesn't appear on the JApplet.
here's my code:
how can i fix this?Java Code:this.setSize(740,780); this.setLayout(null); JButton button = new JButton("New Game"); this.add(button); button.move(720-button.getSize().width, 760);
-
Re: JButton in JApplet
ok. i did some research + it looks like i could use GridBagLayout.
can anyone show an example of this?
-
Re: JButton in JApplet
Your research should also point you to the layout manager tutorials which will be able to show you GridBagLayout and the other layouts far better than we possibly can. Why not give this a look and then come on back if you're still stuck.
-
Similar Threads
-
ActionListener for JButton after changing Button to JButton
By ravi.joshi53 in forum Java AppletsReplies: 2Last Post: 10-07-2011, 07:35 AM -
JApplet on MAC
By ld_pvl in forum Java AppletsReplies: 0Last Post: 08-23-2009, 01:40 PM -
JFrame to JApplet or JApplet to JApplet
By ramesh.8189 in forum AWT / SwingReplies: 13Last Post: 02-08-2009, 06:14 AM -
JApplet problems
By Rgfirefly24 in forum New To JavaReplies: 2Last Post: 04-24-2008, 07:36 PM -
Database to JApplet
By Preethi in forum New To JavaReplies: 0Last Post: 03-26-2008, 05:18 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks