Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Mystified - how does my Java/Swing/Matisse application remember its window size?

Posted on 2012-08-13
5
Medium Priority
?
601 Views
Last Modified: 2012-08-14
Java 5,
Swing,
Matisse,
Windows XP

Hi,
I have a Java Swing application on my windows computer , it was constructed with matisse using Netbeans (6.x I think, not certain).

It did not use an installer, just unzipped the zip file and ran by double clicking a startup script.

If I resize the application and then exit the application, then the next time I restart the application , it remembers the size from the last session.

Since it's Java, and there was no installer involved, I don't expect that information to have been stored in the registry or any of the hidden user directories; I would expect to find a properties file or something similar in the application's own folder space ... but so far have not been able to find anything like that.

Anyone got any suggestion where the application is saving its startup size?

Thanks
-tom
0
Comment
Question by:scooternh
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 38289380
Would have to run and have a look at the app
0
 
LVL 12

Expert Comment

by:Seaton007
ID: 38289458
Windows probably stores the last position/size in the registry after you run the application.
0
 
LVL 28

Accepted Solution

by:
dpearson earned 2000 total points
ID: 38290568
I think you're right to expect that it would be stored in a properties file - but I would expect that to be under the user folders.  On Windows that's something of a requirement as the Program Files directory isn't writable for certain Windows installations (e.g. non-admin users).

The app is of course free to choose pretty much any location, but I'd start by looking in either:
Users\<your-name>
or
Users\<your-name>\AppData

Doug
0
 

Author Closing Comment

by:scooternh
ID: 38292393
Thanks Doug, this was a real pea under the mattress :)
I had actually gone there earlier, but couldnt find it on first pass; your suggestion gave me the nudge to go look again more carefully. I was looking for something under 'Java' the first time, but this time through noticed the C:\Documents and Settings\<username>\Application Data\Sun\<my application name> folder ... and in there was mainFrame.session.xml
0
 
LVL 28

Expert Comment

by:dpearson
ID: 38293664
Good hunting!

Doug
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month20 days, 19 hours left to enroll

810 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