I am using Dimension(width, height) to manipulate the height and width , but only the height is changing, not the width.
I tried the following –
cal = new JTextField("0"){
@Override
public Dimension getPreferredSize(){
return new Dimension(200, 40);
}
};