Java button/gridbaglayout

Is there a way to either set a max size of a button(or non re sizable), or not allow the columns in a gridbaglayout to change size if a component grows ?

i.e 
    btn.setMaxsize();
    btn.resizable(false);
    gridbaglayout.lockcolumns();

This is not what I am coding but what I am trying to achieve. Thanks for any help provided.

Answers


set below 3 properties with max value.

    btnNewButton.setMaximumSize(new Dimension(10, 10));
    btnNewButton.setMinimumSize(new Dimension(10, 10));
    btnNewButton.setPreferredSize(new Dimension(10, 10));

Need Your Help

Why method created at top-level is mentioned in Object.private_methods?

ruby self

As I'm understand, method created at top level in Ruby, become private instance method of Object. But why zzz method name is returned in array when call Object.private_methods? And why Object and s...

Connect To WCF Service through Android App

java android wcf web-services

OK so by the looks of things this question has been asked a few times but sadly it doesn't resolve my issue.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.