From: bourrik <b@mail.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to add a new property to a handle?
Message-ID: <ef537ba.8@webcrossing.raydaftYaTP>
Date: Tue, 17 Apr 2007 18:35:05 -0400
References: <ef537ba.3@webcrossing.raydaftYaTP> <ef537ba.4@webcrossing.raydaftYaTP> <ef537ba.5@webcrossing.raydaftYaTP> <ef537ba.6@webcrossing.raydaftYaTP> <ef537ba.7@webcrossing.raydaftYaTP>
Lines: 51
NNTP-Posting-Host: 82.235.150.156
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:403833



Yair Altman wrote:
>
>
> bourrik wrote:
>> You did a very good job on this one ! It's great to be able to
> add
> java components like this.
>
> Thanks for the compliment. I must say I'm pretty proud of the
> result
> myself...
>
>> Now I'd like to add a JTable to a figure, but I can't figure
out
> how
>> to do it properly. A JTable needs some input args either to
> define
>> data and headers, or at least to tell Java how many rows and
> columns
>> to display. How do you use such a syntax with uicomponent ?
>
> JTable is indeed one of the more complex elements that you can add.
> Normally, you'd want to place a JTable (or JTree etc.) within a
> JScrollPane, and place THAT using UICOMPONENT, so that you'd have
> default scrollbars etc. In JTable, you also need to take care of
> the
> TableModel, sorting, cell Editors/Renderers etc. etc.
>
> So far for the bad news. The good news is that I've already done
> all
> that: Feel free to download my "Java-based data table" from the
> File
> Exchange: <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14225>
>
> If you look at that file's m-code, you'll see many examples of how
> to
> pre-set Java items before the call to UICOMPONENT or JAVACOMPONENT.
> My code is basically an enhanced wrapper for Matlab's
> undocumented/unsupported UITABLE function.
>
> Comments welcome.
>
> Yair

Actually I found your other contribution on tables right after having
posted previous reply. I'll take a look at it and give you my
feedback. At first sight, it seems as well documented as uicomponent
and I'm already grateful for that.

Thanks and see you later for comments/remarks