?
Solved

MDI performance problem with JInternalFrames

Posted on 2001-07-09
4
Medium Priority
?
437 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 900 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 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