Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Gird width problem with JDateChooser object

Posted on 2006-06-27
5
Medium Priority
?
511 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 400 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 1600 total points
ID: 16997165
also try setting ipadx value
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17013955
:-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

782 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