Solved

MDI performance problem with JInternalFrames

Posted on 2001-07-09
4
388 Views
Last Modified: 2012-06-21
I'm creating an applet which implements a MDI (Multiple Document Interface) using the jdk 1.2 (with respective swing components from the javax.swing.* package).  The MDI consists of a JFrame which contains a JDesktopPane.   JInternalFrames are created and then added to the JDesktopPane (via a separate Thread) using the method call:

jDesktopPaneObject.add(jInternalFrameObject).

The JInternalFrames appear on the JDesktopPane OK, however their GUI performance is terrible.  Repositioning (draging and droping) or resizing the window is excrusiatingly slow (about 20x slower than using simple JFrames).  

Does anyone know how I could improve the GUI performance of my MDI so that my
JInternalFrames respond about as well as if I used JFrames?

0
Comment
Question by:CatDevlp00
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:Sasha_Mapa
ID: 6268106
A. DON'T use 1.2 - use either 1.1 (this is preferable, if you can) or 1.3
B. Try myDesktopPane.putClientProperty("JDesktopPane.dragMode", "outline") or myDesktopPane.putClientProperty("JDesktopPane.dragMode", "faster")


Sasha Maryanovsky.
0
 

Author Comment

by:CatDevlp00
ID: 6270120
Thanks for the help Sasha

However I don't have a choice for the jdk version, I must use 1.2.

The call myDesktopPane.putClientProperty ("JDesktopPane.dragMode", "outline") improves the performance to an acceptable level.  However, if I can, I would like to drag and drop the entire JInternal frame and not just the outline.  The other method
myDesktopPane.putClientProperty("JDesktopPane.dragMode", "fastest") doesn't improve the performance.  Do have any other ideas on how to improve performance dragging and dropping JInternalFrames?

0
 
LVL 7

Accepted Solution

by:
Sasha_Mapa earned 300 total points
ID: 6272180
>The other method myDesktopPane.putClientProperty("JDesktopPane.dragMode", "fastest") doesn't improve the performance.

It's not "fastest", it's "faster" - it should improve performance of dragging significantly.

Sasha Maryanovsky.
0
 

Author Comment

by:CatDevlp00
ID: 6273604
Thanks for the help Sasha, I must have been starring at my screen too long yesterday.
I tried "faster" which did improve the drop and drag performance of the JInternalFrames.
However, performance still suffers if the user opens more than 3 JInternal Frames at once.

I'm going to use "outline" instead, which will be acceptable.  Thanks for your help.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now