-
Java Swing GUI Resize Questions
I'm trying to make a gui that allows resizing, but does not spread the elements around the window. I would like to keep the same x and y coordinates of each item essentially, even if the window was resized, or possibly keep the distance and size the same of each item, but keep these items centered in the window. Any possible ideas on the best way to do this in Java using swing?
-
You can make the coordinates of each object relative to the center of the applet.
-
Use null for layoutmanager in your panel and set each component's location using setBounds(x,y,width,height), and add them to the panel. Add this this panel to another panel with FlowLayout.CENTER. For applets this should not be a problem, I have never managed to resize an applet (maybe its possible, but I don't know how).
eschew obfuscation
Similar Threads
-
Replies: 1
Last Post: 05-13-2005, 06:46 AM
-
By Anna in forum Database
Replies: 1
Last Post: 01-23-2003, 12:41 PM
-
Replies: 1
Last Post: 05-08-2002, 07:17 AM
-
By Brad O'Hearne in forum Talk to the Editors
Replies: 2
Last Post: 11-05-2001, 09:32 AM
-
By JJ in forum Enterprise
Replies: 1
Last Post: 07-06-2000, 04:50 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|