Friday, December 28, 2012

How to set form size during Runtime in java?

How to set form size during Runtime in java?

Problem
Hi, This is my java code. I resized and positioned components using this code. But when i get the size of the components that are resized dynamically, i am getting only the preferred size that i set in design when designing but not the actual size that i had in runtime. So how to get the size of the resized components? Can any one help me?

Solution 1


public function()
{
initComponents();
this.setSize(this.getToolkit().getScreenSize());
}

1 comment:

Comment Here..