• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jinternalframe active frame different with Java 7  RSS feed

 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in the progress of updating my code and re-testing after switching from Java 6 to Java 7. When I open multiple JInternalFrames in my application under java 6 I am used to closing the top most internal frame and having the frame immediately under it become the next active frame. When I run the same code under Java 7 I see a different behaviour in as much as when I close the last frame I opened, the next one to become active is the first one.


To illustrate this another way, lets say I open 5 internal frames, 1,2,3,4 & 5

In java 6 when I close frame 5, frame 4 becomes the active frame.

In java 7 when I close frame 5, frame 1 becomes the active frame.

I have a lot of code and it's not immediately practical to post an example of my code. If the above behaviour is known and someone can advise how I can get Java 6 behaviour to be used now I've migrated to java 7 it would be most helpful.

Many thanks in advance,

Dave
 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To help illustrate what I'm describing I've recorded 2 small video's of my applications screen.

Java 6 Internal Frames Example

Java 7 Internal Frames Example

Although I do have code which sets the position of newly created internal frames I don't do anything when a frame is closed - just dispose()

As such I've not idea what is governing which frame becomes active when another one is closed. Any clues most appreciated.
 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should also mention that I'm running on a Mac and the versions of Java concerned are

1.7.0_60

and


Apple's last update of Java 1.6
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you closing the JInternalFrame? Do you use the setClosed() method?
Please post your SSCCE code so we can take a look.
 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use dispose() on the buttons action event handler. The code for this application is huge with a lot of dependancies between classes. The last release of the project which still has Java 6 code syntax for Generics etc is available for download from http://www.commander4j.com. I do appreciate that speculating without code to look at is not very practical. I have download a JinternalFrame basic demo app from the Oracle website and that works under java 7 as expected, so it must be something I'm doing in my code which is being interpreted differently between Java 7 and 6 but I've not got a clue where to look to find the problem.

Thanks for the reply

Dave
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Garratt wrote:The code for this application is huge with a lot of dependancies between classes. ..... I have download a JinternalFrame basic demo app from the Oracle website and that works under java 7 as expected, so it must be something I'm doing in my code which is being interpreted differently between Java 7 and 6 but I've not got a clue where to look to find the problem.

That is exactly why I suggested SSCCE. Please do take out time to visit http://sscce.org/ to understand what it really means
 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do understand, and I will try to comply with your request.
 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just run my application under Windows and it runs perfectly (as it did with Java 6). So - another Mac specific java problem :-(

Java 7 (Windows) JInternalFrames
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!