Solved

Gird width problem with JDateChooser object

Posted on 2006-06-27
5
481 Views
Last Modified: 2006-11-18
I have a new date drop down selection box and I having problerms with the grid not making it wide enough so the date is actually there, but on digit is half cut off when viewing...

How do I widen the grid field to allow it wider.. I have included partial code below...

*** beginDateChooser is a JDateChooser object widget ***

GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(5, 2, 2, 2);
gbc.anchor = 17;

gbc.gridx = 0;
gbc.gridy = 0;
nPane.add(beginDateChooser, gbc);
nPane.add(new JLabel("Begin Date"), gbc);
gbc.gridx++;
nPane.add(beginDateChooser, gbc);  //point where field needs to be wider, but just not
0
Comment
Question by:TheVeee
  • 2
  • 2
5 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 100 total points
ID: 16996320
Try setting weightx for that column
0
 
LVL 5

Author Comment

by:TheVeee
ID: 16996603
CEHJ,

Tried that, nothing happened at all....

Its like the 5 columns are locked... looks like this is never set anywhere except on the default....
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 16997163
why are u adding the date chooser two times?

try setting wightx and fill properties.

and gbc.anchor = GridBagConstraints.WEST;
0
 
LVL 26

Accepted Solution

by:
ksivananth earned 400 total points
ID: 16997165
also try setting ipadx value
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17013955
:-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jsp insert to database example 2 44
CSV file parsing thru Java 13 34
Eclipse Help Java EE 5,6,7 Documentation, why not Java EE 8 8 30
Java class and jar 3 20
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question