🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11599

Re: Swing questions

#11599
From: Quach Hoa Thanh
Date: Mon, 26 Apr 1999 00:00
36 lines
2377 bytes
Thank for the quick response. I am comfortable in writing custom Delphi
components, but not yet in Java. It will be a while before I can jump on the
band wagon.

Thanh

Jason Burton wrote:

> > 1. I can set the property Border of a JButton to None at design time and
> > the border disappears. JBuilder Adds a line JButton1.SetBorder(null).
> > However I can't set it back at design time with a border. I can remove
> > the line JButton1.SetBorder(null) in the source pane and the border will
> > reappear. Am I missing something here.
>
> Nope, you're right.  The object inspector looks for all instances of a
> Border class when listing the available borders for your button.  Typically,
> there are no border instances created, so the only option is "none."  If you
> want a different border, you'll either have to add some Border classes to
> your component pallete and drop borders onto a form, or set custom borders
> in code.
>
> > 2. When I set the property of TooltipText of JButton1, it works fine
> > when the mouse is over it. When I reset the property of the ToolTipText
> > to nothing , JBuilder still leave the following line in the source code
> > jButton1.setToolTipText(""). This causes a small rectangle to appear
> > everytime the mouse is over JButton1 which isn't the right behaviour,
> > anybody runs into the same problem?.
>
> I couldn't imagine using Swing components directly.  I would subclass the
> button to eliminate this behavior.  The problem really seems like some sort
> of IDE limitation.  To get rid of the setToolTipText("") line, you would
> have to get the IDE to recognize the "default" property value (like Delphi),
> and leave out the setXXX method when the property value equals the default
> value.
>
> Jason Burton
Technical Details
Message-ID: <3724DA32.C74DD11F@ns.sympatico.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3722B4FC.77BA7A91@ns.sympatico.ca> <7g1u2r$gi57@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,3231f100451f603
X-Google-Attributes: gid111d45,public
From: Quach Hoa Thanh <thq.qua@ns.sympatico.ca>
Subject: Re: Swing questions
Date: 1999/04/26
Message-ID: <3724DA32.C74DD11F@ns.sympatico.ca>
X-Deja-AN: 471197420
Content-Transfer-Encoding: 7bit
References: <3722B4FC.77BA7A91@ns.sympatico.ca> <7g1u2r$gi57@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: Self Employed
Mime-Version: 1.0
Reply-To: thq.qua@ns.sympatico.ca
Newsgroups: borland.public.jbuilder.java.swing