Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2006

Tip: Looking for answers? Try searching our database.

JInternalFrames title on right

Thread view: 
Vova Reznik - 01 Feb 2006 19:49 GMT
Does any one now how to move
JInternalFrames title pane (place it on right
side for example)?
Thanks
Andrey Kuznetsov - 01 Feb 2006 20:12 GMT
> Does any one now how to move
> JInternalFrames title pane (place it on right
> side for example)?

to move is easy, the question is - how it will be rendered...
BasicInternalFrameUI ui = (BasicInternalFrameUI )getUI();
ui.setWestPane(ui.getNorthPane());

I didn't tried it however.

--
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
Vova Reznik - 01 Feb 2006 20:16 GMT
>>Does any one now how to move
>>JInternalFrames title pane (place it on right
[quoted text clipped - 11 lines]
> http://reader.imagero.com Java image reader
> http://jgui.imagero.com Java GUI components and utilities

It doesn't work - i tried million variants like this.

If you will not
   setNortPane(null);
it will keep empty place in north part.
If you will - it uninstalls listeners.
I tried to keep references for BorderListener but without success
Andrey Kuznetsov - 01 Feb 2006 20:45 GMT
> If you will not
>    setNortPane(null);
> it will keep empty place in north part.
> If you will - it uninstalls listeners.
> I tried to keep references for BorderListener but without success

Why do you need BorderListener?
It is rather buggy thing.
Write your own.

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

Andrey Kuznetsov - 01 Feb 2006 21:27 GMT
> If you will not
>    setNortPane(null);
> it will keep empty place in north part.

don't set it to null because it is then removed, from frame and you can't
readd it.
to remove empty space at north part add following line:

northPane.setPreferredSize(new
Dimension(northPane.getPreferredSize().height, 0));

However, it rendered wrong, but you can drag it.

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

Vova Reznik - 01 Feb 2006 22:08 GMT
>>If you will not
>>   setNortPane(null);
[quoted text clipped - 8 lines]
>
> However, it rendered wrong, but you can drag it.

Thanks, finally I wrote my own title pane
and added to it my own MouseMotionListener.

In JInternalFrame I added
BasicInternalFrameUI ui = (BasicInternalFrameUI) getUI();
ui.setNorthPane(null);
ui.setWestPane(myTitlePane);
Andrey Kuznetsov - 01 Feb 2006 22:26 GMT
> In JInternalFrame I added
> BasicInternalFrameUI ui = (BasicInternalFrameUI) getUI();
> ui.setNorthPane(null);
> ui.setWestPane(myTitlePane);
I am curios how did you added it to JInternalFrame?

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

Vova Reznik - 02 Feb 2006 15:22 GMT
>>In JInternalFrame I added
>>BasicInternalFrameUI ui = (BasicInternalFrameUI) getUI();
>>ui.setNorthPane(null);
>>ui.setWestPane(myTitlePane);
>
> I am curios how did you added it to JInternalFrame?

I subclassed JInternalFrame.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.