• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting look and feel of a component

 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
Rob Spoor
Sheriff
Pie
Posts: 20493
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Posts: 48376
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the Java Tutorials.
 
Campbell Ritchie
Sheriff
Posts: 48376
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I didn’t realise we are not using Swing.
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for both of your replies. I appreciate it a lot
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20493
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be honest, I've never tried anything other than JMF so I couldn't recommend another one.
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic