🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Tip on visually designing with Swing 0.7 controls

#3271
From: John Parsons
Date: Tue, 24 Feb 1998 00:00
32 lines
2088 bytes
We were having a problem getting Swing components to appear on panels,
despite having added the JARs to the CLASSPATH and IDEPATH (in
\bin\jbuilder.ini), and having added them to a component tab page.
Then, we discovered that by creating an AWT button and then changing it
to a JButton, in the source, it magically appeared on the Design pane!
From then on, we able to add Swing controls visually, in the usual way.

To add swing to jbuilder:

In Tools IDE Options and add to the class path
c:\java\swing-0.7\swing.jar and c:\java\swing-0.7\windows.jar

To add it to the palette - use Tools Configure Pallette Add a new page,
then click on the tab add from archive.

When you switch to design mode, JBuilder parses the source file and
extracts design information. You should add this line to the import
section BEFORE you add swing controls to a form. import
com.sun.java.swing.*;

To design things fast using swing in Jbuilder:

Well the easiest way to do this is to use AWT components - these are
very similar to swing components. Then replace all the generated names
with the swing equivalent (ie add a J to the front), and comment out the
import java.awt.*; line.

i.e.
Applet -> JApplet
Button -> JButton
Panel -> JPanel
Technical Details
Message-ID: <34F2D4DA.43ECEA12@cromwellmedia.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,290270a534ad716d,start
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f4bc9,290270a534ad716d,start
X-Google-Attributes: gidf4bc9,public
X-Google-Thread: f74b3,290270a534ad716d,start
X-Google-Attributes: gidf74b3,public
From: John Parsons <jparsons@cromwellmedia.co.uk>
Subject: Tip on visually designing with Swing 0.7 controls
Date: 1998/02/24
Message-ID: <34F2D4DA.43ECEA12@cromwellmedia.co.uk>
X-Deja-AN: 328175010
Content-Transfer-Encoding: 7bit
To: cboroshok@securitydynamics.com
Content-Type: text/plain; charset=us-ascii
Organization: Cromwell Media
Mime-Version: 1.0
Reply-To: jparsons@cromwellmedia.co.uk
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,borland.public.jbuilder.thirdpartytools