Results 1 to 8 of 8
Thread: JPanel over more JPanels..?
- 08-18-2010, 11:56 PM #1
Member
- Join Date
- Aug 2010
- Posts
- 3
- Rep Power
- 0
JPanel over more JPanels..?
So for the app I'm developing it contains MANY different panels all within one JFrame. Now I need the functionality of clicking on a maximize button on one of the panels within the frame and bringing it full screen (i.e. filling the frame).
Ive been having issues covering the other panels with the maximized panel. Is this even possible? Removing all the panels, making this one full-screen, then adding all the other panels back in when I minimize down to normal again is going to be very difficult if that's what I must do.
Any opinions here? Is there some z-dimension layering that I can't find? Or something? I've tried setting the visibility of the under panels, but they still seem to take up their space.Last edited by BraydenJames; 08-18-2010 at 11:56 PM. Reason: Spelling errors >.<
- 08-19-2010, 08:01 AM #2
I think I'd display the double clicked JPanel in a full screen modal dialog.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 08-19-2010, 08:09 AM #3
Is your problem something like, even you maximized the JFrame but the panel contents don't resize accordingly and stays as before?
Adding button that do the functionality of the maximize, then what's the use of maximize button at top-right of Frame.
-
If you have multiple panels, use layout manager.
You can use property like anchor points and horizontal/vertical resize.
-regards
- 08-19-2010, 06:05 PM #4
Member
- Join Date
- Aug 2010
- Posts
- 3
- Rep Power
- 0
So I've been trying the dialog thing, and I can put the clicked panel in a full screen dialog pretty easily.. But getting it back in place when they close the dialog is showing to be a bit more difficult.
And my JFrame containing the panels is fullscreen, then contains about 6 panels within it. I just need to be able to make an individual panel full screen on click, then back to the size it was.
- 08-20-2010, 07:10 AM #5
- 08-20-2010, 08:14 PM #6
A Component can have only one parent. Once you have added your panel to a dialog, it no longer resides in the frame. You'll have to add it back in the appropriate location.
IMO a better option would be to maintain two copies of each panel.
dbLast edited by DarrylBurke; 08-20-2010 at 08:18 PM.
- 08-23-2010, 09:51 PM #7
Member
- Join Date
- Aug 2010
- Posts
- 3
- Rep Power
- 0
Alright well I'm giving this a shot. But quick question, I'm having issues making a copy of a component (JPanel) on the go. Making a new container and setting it equal to the old one just passes around the pointer, and is using the same component, not making a copy. Is there an easy way to do this?
- 08-23-2010, 10:22 PM #8
Similar Threads
-
Problems regarding JPanels in JPanels
By ColtonPhillips in forum AWT / SwingReplies: 2Last Post: 07-19-2010, 08:33 PM -
JList and JPanels
By JetsYanks in forum New To JavaReplies: 8Last Post: 12-25-2009, 02:11 PM -
Posistioning Jpanels
By owain1221 in forum Java AppletsReplies: 7Last Post: 11-15-2009, 11:21 PM -
HELP with jPanels
By maverik_vz in forum AWT / SwingReplies: 1Last Post: 03-12-2009, 11:46 AM -
How to add Images to JPanels?
By Soda in forum New To JavaReplies: 3Last Post: 12-08-2007, 05:54 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks