🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #368

Re: Professional usage of Swing

#368
From: Alexey N. Solofnenko
Date: Mon, 02 May 2005 16:09
34 lines
2245 bytes
If I understood your question correctly.... I usually add method 
initWith(SomeObject obj) method that I call just after a form is created.

- Alexey.

Thomas Arend wrote:
> I have once again one of these questions dealing with the professional usage
> of the advices of school-books about java.
> So here it is:
> I try to implement an application, that in the whole manipulates a certain
> class A. That means every action in the gui is to manipulate a central
> object OA.
> I have implemented the manipulation of the object OA in an apllication that
> can to be used on the command-line.
> 
> Now I would like to use swing-components. And here the problem comes up: In
> which class (extended from a Swing component) do I now create the central
> object?
> Is it the "main" part, where I normally would only create the Jframe an call
> "frame.show"; is it in the JFrame-constructor or is it in the content
> Pane in the JPanel, where I also implement the Buttons, menues and so on?
> 
> And how do I make the central object known to all components of the GUI
> (in other words: Where do I implement the call of the methods of  the class
> to manipulate the object for example after pressing a Button?)
> 
> A long question, but as I said: My books only tell me where it is posible,
> but not what is best.
> 
> Thanks
> Thomas
> 
> 
> 
Technical Details
Message-ID: <427650ba$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4274ed66$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,ee5938833f2078a1
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 02 May 2005 09:09:31 -0700
From: "Alexey N. Solofnenko" <trelony@mail.ru>
User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050420)
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Professional usage of Swing
References: <4274ed66$1@newsgroups.borland.com>
In-Reply-To: <4274ed66$1@newsgroups.borland.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.200.221.5
Message-ID: <427650ba$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115050170 208.200.221.5 (2 May 2005 09:09:30 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail