Solved

MDI performance problem with JInternalFrames

Posted on 2001-07-09
4
429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn different types of Android Layout and some basics of an Android App.
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…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

695 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