Path: news.mathworks.com!not-for-mail
From: "Arwel Hughes" <a.v.hughes@rl.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: JSlider events in a que
Date: Fri, 8 Feb 2008 11:45:04 +0000 (UTC)
Organization: STFC Rutherford Appleton Laboratory
Lines: 49
Message-ID: <fohfc0$nim$1@fred.mathworks.com>
References: <fhhqk1$bkh$1@fred.mathworks.com> <fhhrgu$oej$1@fred.mathworks.com> <fhi3cv$drc$1@fred.mathworks.com> <foh4t0$qat$1@fred.mathworks.com> <foh8vn$oh7$1@fred.mathworks.com> <fohaan$dsg$1@fred.mathworks.com>
Reply-To: "Arwel Hughes" <a.v.hughes@rl.ac.uk>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202471104 24150 172.30.248.37 (8 Feb 2008 11:45:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 8 Feb 2008 11:45:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 408081
Xref: news.mathworks.com comp.soft-sys.matlab:450097


Hi Johannes,
JSlider is a Java component, so what I do is to put it into 
a pure Java container (like a JFrame). So a very simple 
example would be to do something like this.....


import javax.swing.*;
import java.awt.*;
myFrame = JFrame();
mySlider = JSlider();
myFrame.getContentPane().add(mySlider);
myFrame.setSize(300,300);
myFrame.setVisible(true);


If you want to use a Java component in a Matlab gui, you 
have to use the 'javacomponent' command. You can find 
details of that here..


http://www.mathworks.co.uk/matlabcentral/fileexchange/loadFi
le.do?objectId=15580&objectType=FILE

Hope this helps,
Arwel














"Johannes " <RudiRocker@gmx.net> wrote in message 
<fohaan$dsg$1@fred.mathworks.com>...
> Thanks for your reply, but how can I create a JSlider in 
an
> existing gui?
> 
> Greetings,
> Johannes
>