Article View: borland.public.jbuilder.java.swing
Article #12236JdbNavToolBar size/designer problems
From: Randall J. Parr
Date: Tue, 02 Feb 1999 00:00
Date: Tue, 02 Feb 1999 00:00
54 lines
2823 bytes
2823 bytes
I have JB201 with javax patch installed. I am targeting JDK1.2 and using only JDK1.2, dbSwingX, and DataExpress components I have a JFrame (border layout) with a JMenuBar, a JdbNavToolBar (north), a JScrollPane (center) containing a JdbTable, and a DataModule containing a QueryDataSet which accesses a single Oracle database. The frame functions ok but I am having manipulating the JdbNavToolBar in the designer and inconsistencies in how the toolbar looks in the designer and at runtime. 1) The JdbNavToolBar is a reasonable size in the designer but displays MUCH larger at runtime. If the frame is sized such that the entire toolbar is visible and it's words readable, the frame takes up 3/4 of a 1280x1024 display and is so large it leaves the grid looking lost. The grid appears and similar and reasonable size in both the designer and at runtime. The actual contents of each button (text, icon) don't appear much bigger but there's whole button takes up a lot more room. 2) After reading in the Loy and Wood "JFC Swing" book, I noticed the default JdbNavToolBar layout was set to GridLayout (as opposed to the BoxLayout). I tried setting the JdbNavToolBar's layout property to the BoxLayout2 choice but nothing happens (that is, no changes are made in the source at all). Am I doing something wrong or is this a bug? I then added the following line to jbInit() which set the layout to the BoxLayout. jdbNavToolBar1.setLayout(new BoxLayout(jdbNavToolBar1, BoxLayout.X_AXIS)); This changes the layout in the designer to be even narrower and more compact. At runtime the layout is narrower, but not much, and is still much larger than in the designer. I believe this is caused, in part, by differences (default behavior, etc.) between the Swing used in designer and the Swing used in JDK1.2 but I can't seem to figure out just what they are. My specific questions are then: A) Can I get the JdbNavToolBar to look, at runtime, more or less as it does in the designer? B) How can I adjust the JdbNavToolBar to be smaller and more compact (at runtime)? C) Is there a way to have JdbNavToolBar display only icons, only words, or both (as in JBCL GridControl)? Thanks Randall J.Parr Temporal Arts
Technical Details
Message-ID:
<36B73258.1E6AC1AA@temporal.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,807a5932a5f7bc0,start X-Google-Attributes: gid111d45,public From: "Randall J. Parr" <rparr@temporal.com> Subject: JdbNavToolBar size/designer problems Date: 1999/02/02 Message-ID: <36B73258.1E6AC1AA@temporal.com> X-Deja-AN: 439828329 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: rparr@temporal.com Newsgroups: borland.public.jbuilder.java.swing