LookAndFeel  
Author Message
Bryan





PostPosted: 2003-11-20 8:50:00 Top

java-programmer, LookAndFeel Hi,

I have a couple of issues I'm trying to resolve. Hopefully someone will have
some ideas.

First, I've been unsucessful trying to get the MotifLookAndFeel working.
I've following every example I have (on paper) and nothing seems to work.
I've run the app on both the PC and Linux box; the window looks and feel
shows up on the PC and metal on the linux machine. Anyone know what's going
on or what could be missing?

Second, the app I've been working has a bunch of ToggleButtons and the color
of the button changes based on selection. All I do is set the background
color in the button press callback. Okay, fine. But when I run the code in
linux, I'm unable to change the color of the "select" mode of the Toggle
button. It always gray. Again. Does anyone know what's going on? From all my
years, this should be extremely simple. Why would it work correctly on the
PC and not in unix?

Thanks in advance.


Bryan


 
John McGrath [TeamB]





PostPosted: 2003-7-21 11:49:00 Top

java-programmer >> LookAndFeel On 7/18/2003 at 5:00:50 PM, Bryan wrote:

> I have a question regarding lookandfeel.

Note that this is the borland.public.install.jbuilder newsgroup, which
is for question regarding installing JBuilder. The appropriate place
for this question is borland.public.jbuilder.java.swing. I have set
follow-ups to there.

> However on my linux box I've only been able to obtain the lookandfeel
> of the "metal" flavor. I've tried the by-hand approach to set the look
> and feel to motif but no luck.

What do you mean by the "by-hand" approach? Are you talking about
setting the look-and-feel for your program or for the UI Designer?

> While I've been able to work with the gui builder/designer with the
> Motif lookandfeel, once I run the code it switches over to Metal.

The Metal look-and-feel is the default. If you do not do anything to
change that, you will get Metal. Changing the L&F that the designer
uses to design a component has no effect on the running program.

Look at the UIManager class for how to change the look-and-feel.

--
Regards,

John McGrath [TeamB]
 
arphonewsg





PostPosted: 2005-4-8 18:12:00 Top

java-programmer >> LookAndFeel how do you use the lookandfeel?
in particular, where the .jar file should be placed?
 
 
Arnaud Berger





PostPosted: 2005-4-8 18:23:00 Top

java-programmer >> LookAndFeel Hi,

The jar should be added to your classpath.

Changing LaF is done with :

UIManager.setLookAndFeel("lookAndFeelClassName");

Regards,

Arnaud

"arphonewsg" <email***@***.com> a 閏rit dans le message news:
fOs5e.34426$email***@***.com...
> how do you use the lookandfeel?
> in particular, where the .jar file should be placed?


 
 
IchBin





PostPosted: 2005-4-10 1:26:00 Top

java-programmer >> LookAndFeel Arnaud Berger wrote:
> Hi,
>
> The jar should be added to your classpath.
>
> Changing LaF is done with :
>
> UIManager.setLookAndFeel("lookAndFeelClassName");
>
> Regards,
>
> Arnaud
>
> "arphonewsg" <email***@***.com> a 閏rit dans le message news:
> fOs5e.34426$email***@***.com...
>
>>how do you use the lookandfeel?
>>in particular, where the .jar file should be placed?
>
>
>
Should be:
try { UIManager.setLookAndFeel("lookAndFeelClassName"); }
catch (Exception e) {e.printStackTrace();}

--


Thanks in Advance...
IchBin
__________________________________________________________________________

'The meeting of two personalities is like the contact of two chemical
substances:
if there is any reaction, both are transformed.'
- Carl Gustav Jung, (1875-1961), psychiatrist and psychologist
 
 
John McGrath





PostPosted: 2005-4-10 4:02:00 Top

java-programmer >> LookAndFeel On 4/9/2005 at 1:25:37 PM, IchBin wrote:

> Arnaud Berger wrote:
> > UIManager.setLookAndFeel("lookAndFeelClassName");

> Should be:
> try { UIManager.setLookAndFeel("lookAndFeelClassName"); }
> catch (Exception e) {e.printStackTrace();}

I am sure that Arnaud is well aware that setLookAndFeel() throws checked
exceptions. But this code is by no means the only way to deal with them,
and is certainly not the best way under most circumstances. The method
that contains this code could declare that it throws checked exceptions,
or you could log the exception rather than print it, or whatever.

I do not think it makes a lot of sense to specify the exception handling
when it is not central to the question at hand, and particularly when the
information required to determine how exceptions should be handled is not
available. It just adds noise to the discussion and obscures the main
issue.

--
Regards,

John McGrath