🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Setting Frame Element Properties

#15108
From: Daniel Spangler
Date: Thu, 08 Jul 1999 00:00
27 lines
2000 bytes
Just a couple of suggestions...

Make sure you don't have any of your UI controls declared as private.
Make sure that you have a reference to the UI controls that is global to the
Frame.  That is, if you want to be able to go mainframe.myTextField.setText(),
you can't have the controls declared in the contructor or something.

Good luck,
Daniel Spangler


Steve Grant wrote:

> I'm sure this is a simple question but I would appreciate any help.  I have
> a main frame in an application which has a number of interface objects on
> it - text boxes,trees etc.  I would like to access these objects from
> another class(es) that builds the data for the main frame but I can't seem
> to access the various elements in the frame at runtime from this other class
> by using something like the following "mainframe.textbox.setstring(...)".
> When I type in the "mainframe" object in this other class none of the other
> UI elements appear when I type a dot after it. In other languages I've
> worked with you kind of just use the dot notation to access elements of a
> public object and set the properties.  For example  I can always access a
> data module query by using the getdatamodule().getXXXXX.open() method but I
> don't see anything comparable for a frame and its child objects. I'm new to
> Java and don't quite have a feel for some of these things yet. Again, I
> would appreciate any guidance on this.
Technical Details
Message-ID: <37855E80.F69AE58A@home.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7lvnoh$f2e22@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e663f70efb67380d
X-Google-Attributes: gidf74b3,public
From: Daniel Spangler <sonstone@home.com>
Subject: Re: Setting Frame Element Properties
Date: 1999/07/08
Message-ID: <37855E80.F69AE58A@home.com>
X-Deja-AN: 498931625
Content-Transfer-Encoding: 7bit
References: <7lvnoh$f2e22@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language