aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Setting look and feel of a component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting look and feel of a component" Watch "Setting look and feel of a component" New topic
Author

Setting look and feel of a component

Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Hi,

Please have a look at the following code. It is a simple media player



In that code, from line number 103 to 105, I am adding the default media controller interface provided by java to handle media. That is a type of Component. Unfortunatly, this component is in JAVA LOOK AND FEEL. This is a test application and my whole application will be based on SYSTEM LOOK AND FEEL(Windows). Please let me know how to change the component's java look and feel to system look and feel. Thanks>


Are you better than me? Then please show me my mistakes..
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19784
    
  20

JMF doesn't create Swing components but native AWT components. That means that the look&feel does not apply to them. There is absolutely nothing you can do about this, except maybe find a different media library.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Try the Java Tutorials.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Oh, I didn’t realise we are not using Swing.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Thanks for both of your replies. I appreciate it a lot
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Rob Spoor wrote:JMF doesn't create Swing components but native AWT components. That means that the look&feel does not apply to them. There is absolutely nothing you can do about this, except maybe find a different media library.


Thanks for the reply. I appreciate it a lot.

Different library? Like FMJ, JVLC, VLCJ ? VERY HARD to find tutorials isn't it?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19784
    
  20

To be honest, I've never tried anything other than JMF so I couldn't recommend another one.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Rob Spoor wrote:To be honest, I've never tried anything other than JMF so I couldn't recommend another one.


OK. Thanks for the reply. I will do some research on other libraries and will let you all know if I got good results

Marking this thread as solved
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting look and feel of a component