Results 1 to 6 of 6
Thread: JDesktopPane Design
- 08-03-2010, 02:18 PM #1
Member
- Join Date
- Jun 2010
- Posts
- 14
- Rep Power
- 0
JDesktopPane Design
Hello everyone,
I'm designing a window using a JFrame and I added a JDesktopPane. I love the JDesktopPane and working with JInternalFrames, but I have some issues with it. I can add a JInternalFrame when using the standard Layout, but when I change the layout to BorderLayout and add a new Component (eg. JSplitPane to the west) I can't add new JInternalFrames to the JDesktopPane.PALETTE_LAYER.
Also, I want the lower bar, to which you can minimize, be invisible when there is nothing minimized or available and when it is visible, change it's borders (no border). Maby even move it outside the JDesktopPane. Is this possible?
I have searched the source code of JInternalFrame, JDesktopPane, SynthDesktopPaneUI, DesktopPaneUI, etc. but can't find anything helpfull)
Thank you in advance!
- 08-03-2010, 02:43 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
In simple terms, do you know the difference between those layouts ?
- 08-03-2010, 02:55 PM #3
Member
- Join Date
- Jun 2010
- Posts
- 14
- Rep Power
- 0
Hello Eranga,
Thank you for your reply.
What I like to do is to restyle (a new paint) the lower bar (to which you can minimize and see every available JInternalFrame) so that this component does not have any borders and will not be visible when there are no JInternalFrames (anymore) in the JDesktopPane (if possible).
Thank you in advance!
- 08-03-2010, 02:59 PM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Okay, how about the grid layouts then. Did you think about it.
- 08-03-2010, 03:00 PM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you can post your code here it's easy comment by looking at it.
- 08-03-2010, 03:19 PM #6
Member
- Join Date
- Jun 2010
- Posts
- 14
- Rep Power
- 0
Thank you again Eranga,
for those of you who still dont understand my question (I think I did describe it poorly (Denglish?)): try http://img717.imageshack.us/img717/262/screenshotwe.png
My cursor is on the JInternalFrame, which is in the JDesktopPane. Under the JInternalFrame (window within the window) you'll find the panel I would like to restyle. I now think it is called a taskbar and is located above the statusbar(the BorderLayout.SOUTH in the main JFrame), with the arrow pointing to it.
My Code:
So I basically did nothing important, only add a JInternalPane to the JDesktopPane.Java Code:private Container createContentPane() { contentPane.add(ToolBar,BorderLayout.NORTH); contentPane.add(SideBar,BorderLayout.WEST); JDesktopPane DeskTop = new JDesktopPane(); contentPane.add(DeskTop,BorderLayout.CENTER); contentPane.add(Status, BorderLayout.SOUTH); JInternalFrame palette = new JInternalFrame("Palette", true, true, true, true); palette.setBounds(350, 150, 100, 100); palette.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE); DeskTop.add(palette, JDesktopPane.PALETTE_LAYER); JTextArea ta = new JTextArea(); palette.getContentPane().add(new JScrollPane(ta)); palette.setVisible(true); for (int i = DeskTop.getComponentCount()-1; i >= 0; i--){ ta.setText(ta.getText()+i+'\n'+DeskTop.getComponent(i).toString()+"\n\n"); } return contentPane; }
Similar Threads
-
Dispose a JDesktopPane for logout.
By hendrix79 in forum New To JavaReplies: 3Last Post: 02-10-2009, 03:09 PM -
JDesktoppane?
By skatefreak in forum New To JavaReplies: 2Last Post: 01-31-2009, 05:32 PM -
How to clear JDesktopPane
By hendrix79 in forum New To JavaReplies: 12Last Post: 12-10-2008, 11:25 PM -
JDesktopPane demo
By Java Tip in forum javax.swingReplies: 0Last Post: 06-26-2008, 07:43 PM -
How to add SystemTray to JDesktopPane
By elisabethkron@yahoo.co.uk in forum Advanced JavaReplies: 0Last Post: 04-07-2008, 08:37 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks