Solved

Gird width problem with JDateChooser object

Posted on 2006-06-27
5
446 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IT Company 5 69
changePi Challenge 15 77
Java passing arguments (type error) 2 35
VB Script to add site to Java Exception List 4 18
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
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 …

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now