🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1856

Re: Beginner: standard for storing window settings

#1856
From: John McGrath TeamB
Date: Mon, 27 Aug 2001 20:31
31 lines
2210 bytes
On Mon, 27 Aug 2001 10:43:49 -0700, Quoc Thang NGUYEN wrote:

> Are there any standards for Java/Swing applications to store
> and retrieve these settings, or can one just simply stream the
> corresponding properties (left, top, width, height, iconized
> etc...) in a binary file?

There are no real standards for storing window placement information
in Java, and even control of window placement has been pretty weak.
It does allow you to control the iconified state and window bounds,
but I think that is about it, so I don't think your "etc" applies.
In JDK 1.4, there will be control of the maximized state of a window.

Probably the easiest way you could store such information would be in
a property file, which is a simple text file of name/value pairs.  If 
you have more complex information to store in addition to the window 
geometries, you might look at using an XML file.

You could use a binary format such as serialization or a custom format 
stream file, but it would probably not be much more efficient.  Such 
formats are less flexible (they are difficult to edit) and there are 
pitfalls that come with serialization.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.15f4761f8a58255498a5bc@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-peer-west.sprintlink.net!news.sprintlink.net!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3b8a8778_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,4b37095da05191db
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-08-27 13:37:50 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: Beginner: standard for storing window settings
Date: Mon, 27 Aug 2001 16:31:38 -0400
Message-ID: <MPG.15f4761f8a58255498a5bc@forums.borland.com>
References: <3b8a8778_1@dnews>
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 998944297 209.92.40.60 (27 Aug 2001 13:31:37 -0700)
Lines: 31
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-peer-west.sprintlink.net!news.sprintlink.net!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews