Re: Adjusting column widths of PropertySheetView

Kevin P Koch <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <OF147F5CD7.925C63B2-ON86257F3A.0060B355-85257F3A.00610E59@raytheon.com>
To change the column widths, you need to setPreferredWidth on columns from 
the JTable's column model.

To keep the same proportions, you need to handle ComponentResized for 
whatever container your JTable is in.




From:   Tim Boudreau <[email protected]>
To:     "[email protected]" <[email protected]>
Date:   01/14/2016 10:55 AM
Subject:        [platform-dev] Re: Adjusting column widths of 
PropertySheetView



Fish around in the component hierarchy for a JTable is the best I can 
suggest - there's no supported way to do that.

-Tim

On Thu, Jan 14, 2016 at 8:59 AM, <[email protected]> wrote:
I was looking for a way to adjust the PropertySheetView so that instead
of the default width of the two columns (name/value) being the same
size, I'd like to have the first Name column to be smaller than the
second. One of the properties I have shows the file path of a
FileObject, which is quite long. Since I have the UI space, I'd like
the Value column to be longer.

I searched for an easy way to access the enclosed SheetTable so that I
could grab the columnModel and suggest a maximum size for the first
column. I wasn't able to do this even after creating a new class
extending this one. Does anyone have any other suggestions on how to do
this?



-- 
http://timboudreau.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.