Look feel 2 « Development « Java Swing Q&A





1. Look & Feel vs XP    coderanch.com

I have not done much Swing so please excuse a Newbie question. I'm running WSAD on Windows XP. When I run my app in the environment it has flat, square buttons. When I run from the desktop it has rounded 3D buttons. How can I get the latter look all the time? I'm extending legacy code here. The window constructor has ...

2. Problem with Look & Feel Decorations    coderanch.com

While working on my application, I somehow have lost the cross platform window decorations and instead have the decorations of my desktop (Windows XP). My look and feel is set in two sections, the constructor of my main frame which extends JFrame: public Main() { //Create main window super( "Ludamus by Joel Ricker" ); //Create the main panel mainPanel = new ...

3. look and feel    coderanch.com

hi allll, i am makin a project usin swings and AWT and i am using WINDOWS XP , but i am havin a problem with the display, all the components , i.e. the checkboxes buttons etc. look like Windows 98 or ne other previous windows version, how should i set it to look like Windows XP components , which are far ...

4. What is look n Feel concept in Java    coderanch.com

5. Setting look and feel for GUI    coderanch.com

Hello, I am trying to set look and feel for my GUI application, does any one know how to do this? Here is the code with which I was trying : try { UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch ( Exception e ) { } JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("Quick Search"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel label = new JLabel("Search"); frame.getContentPane().add(label); frame.pack(); frame.setVisible(true); I did this ...

6. Look and Feel of Win2000 on XP    coderanch.com

7. Look and Feel please help!!!    coderanch.com

9. Changing my look and feel in Swing    coderanch.com

Hello, I read somewhere that swing has pluggable look and feels. The problem I'm having is this. At my company, the migration to Tiger hasn't even started, so we're still stuck on jdk1.4.2 and it's sub-variants. Is there a way to use the Ocean look and feel in my jdk1.4.2 compiled software instead of the defualt Metal? Thanks.





10. Swing look and feel    coderanch.com

11. Swing - Problem in LookAndFeel    coderanch.com

The below is not compiling. I copied this prgoram from Sun's tutorial. The Error due to this line: JFrame.setDefaultLookAndFeelDecorated(true); import javax.swing.*; public class HelloWorldSwing { /** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread. */ private static void createAndShowGUI() { //Make sure we have nice window decorations. // ...

12. which swing look and feel you prefer ?    coderanch.com

Chris thanks for the link to the laf. It looks pretty slick. Although I did notice a problem (well I've noticed this same problem in the jgoodies plastic laf, so maybe its an underlying java problem). Any time in a JTable where highlighting a selected row changes the color of the text, I get some really weird behaviors. If the selection ...

13. Why a different look and feel on second instance?    coderanch.com

import java.awt.*; import javax.swing.*; public class FrameDemo { public static void main(String[] args) { MyFrame f1 = new MyFrame("First", 75); MyFrame f2 = new MyFrame("Second", 175); } } class MyFrame extends JFrame { MyFrame(String str, int vert) { setTitle(str); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultLookAndFeelDecorated(true); Dimension d = new Dimension(200, 75); setPreferredSize(d); setLocation(50, vert); pack(); setVisible(true); } }

14. swing look and feel chooser    coderanch.com

15. how to use look and feel api?    coderanch.com

hello ranchers.... i have downloaded some look and feel api like mac look for my project . and i dont know how to configure it. if i specify UIManager.setLookAndFeel("path of dir") it gives error as class not found.... And i dont know how to use it. i mean how to put that directory in java home directory? can you plz tell ...

16. Look and Feel    coderanch.com





17. System or User Defined LookAndFeel    coderanch.com

Hi everyone. I have a swing application, and I want it to look like the System's look and feel, so I have this line at the begining: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); However, I also want the user to be able to pick his/her favourite other look and feel if it is different, such as with a -D in the command or a setting in ...

18. Free Look & Feel?    coderanch.com

19. Custom GUI look and feel    coderanch.com

I did some work with PLAF (Pluggable Look and Feel) some time ago; this should still be relevant. Basically, I got started with it simply by looking through the API and trying to piece the puzzle together. To proceed you need to be confident with 2D graphics and the Swing API. The package you'll be mainly working from is javax.swing.plaf, although ...

20. what is pluggable look and feel?    coderanch.com

Pluggable L&F (PLAF) is basically a "skin" system for Swing components - you can change the style of your application by changing its LAF. You can write your own, but the standard runtime also ships with several LAFs. To see what I mean, use any Swing application you've already got at hand and use this wrapper:import javax.swing.UIManager; public class LAFChangeDriver { ...

21. Look and Feel    coderanch.com

ok, i need a little help getting this to work ok i am following this link: https://substance.dev.java.net/docs/getting-started.html I have the substance.jar in my classes folder. Here is my code: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Swingy extends JFrame { public Swingy() { super("Sample app"); this.setLayout(new FlowLayout()); this.add(new JButton("button")); this.add(new JCheckBox("check")); this.add(new JLabel("label")); this.pack(); this.setSize(this.getPreferredSize()); this.setLocationRelativeTo(null); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public static ...

22. Look and feel problem    coderanch.com

Hello all, A previous programmer was using a Look and feel and a project I am working on now. and whenever I add a frame to the project, all the colors of the panels inside this frame are not shown. Anybody knows how to solve this problem ? thanks a lot regards,

23. Changing LookAndFeel    coderanch.com

24. L&F weird behaviour    coderanch.com

i want all my swing buttons to look the same, so i subclassed jButton: package gui; import java.awt.event.*; import javax.swing.*; import javax.swing.border.BevelBorder; public class Botao extends JButton implements MouseListener { private static final long serialVersionUID = -2079982913939399465L; private boolean activo = true; public Botao(String texto, ImageIcon imagem) { super(texto, imagem); setHorizontalTextPosition(AbstractButton.CENTER); setVerticalTextPosition(AbstractButton.BOTTOM); setContentAreaFilled(false); setBorder(BorderFactory.createEmptyBorder()); addMouseListener(this); } public boolean isActivo() { return ...

25. about java look and feel    coderanch.com

26. Designing GUIs with cross-platform look and feel    coderanch.com

Hi - I'm designing an app with cross-platform look and feel. Does anyone know how to design forms with the Netbeans GUI Builder so that the components such as buttons display on the form with cross-platform (i.e. Metal or Ocean) look and feel? I have a Windows XP machine with Netbeans 5.5.1 and the updated GUI Builder module installed. If I ...

27. I need help with Look&Feel .    coderanch.com

Hi Ranchers, I am trying to change the look and feel of the toolbar I created.I keep getting errors,would you please have a look. // toolbar using Swing import java.awt.*; import java.awt.event.*; import javax.swing.*; public class LnFListener implements ActionListener{ Frame frame; public LnFListener(Frame f){ frame=f; } public void actionPerformed(ActionEvent e){ String lnfName=null; if(e.getActionCommand().equals("Mac")){ lnfName="com.apple.mrj.swing.MacLookAndFeel"; }else if(e.getActionCommand().equals("Metal")){ lnfName="javax.swing.palf.metal.MetalLookAndFeel"; }else if(e.getActionCommand().equals("Motif")){ lnfName="com.sun.java.swing.palf.MotiflookAndfeel"; }else ...

28. Look And Feel    coderanch.com

29. look and feel    coderanch.com

30. Look and feel    coderanch.com

31. own java look and feel    coderanch.com

32. look and feel    coderanch.com

33. Look and Feel    coderanch.com

combo.addItem("Windows"); combo.addItem("Metal"); combo.addItem("GTK+"); combo.addItem("CDE/Motif"); combo.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { if(combo.getSelectedItem().equals("Windows")) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception ex) { System.out.println("Failed loading L&F: "); System.out.println(ex); }; } if(combo.getSelectedItem().equals("Metal")) { try { UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (Exception ex) { System.out.println("Failed loading L&F: "); System.out.println(ex); }; } if(combo.getSelectedItem().equals("GTK+")) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); } catch (Exception ex) { System.out.println("Failed loading L&F: "); ...

34. Problem with custom look and feel implementation    coderanch.com

I have a problem with my custom look and feel definition of the LabelUI component. This is my custom LookAndFeel implementation class: package be.fousa.tryout.lookandfeel; import javax.swing.UIDefaults; import javax.swing.plaf.basic.BasicLookAndFeel; public class TestLookAndFeel extends BasicLookAndFeel { private static final long serialVersionUID = 1229104629569351729L; @Override protected void initClassDefaults(UIDefaults table) { final String testPackageName = "be.fousa.tryout.lookandfeel."; final String basicPackageName = "javax.swing.plaf.basic."; Object[] defaults = { ...

35. Problem customizing the look and feel    coderanch.com

My problem is that i want to customize my desktop application by changing its look and feel with a customized one that i downloaded from the internet (a .jar file) But it doesn't work : it compiles and runs fine but i keep on getting the same classic look and feel, here is what i tried in my main() method : ...

36. About LookAndFeel    coderanch.com

37. Classic look and feel     coderanch.com

38. How to change the L&F    coderanch.com

39. look and feel problem    coderanch.com

40. 3rd party API to enhance look and feel of swing application    coderanch.com

Hello there, Is there any third party API available for swing applications just as LWUIT is available for Java ME ? We have developed the swing application but now we need to enhance the GUI to the extent such that it should not appear to be a swing application with rich GUI. Can anyone suggest me such API that meets the ...

41. different look and feels for every component in a swing application    coderanch.com

is it possible to make, for example 2 different L&F in a two components within the same window? example "Metal" for a button and "Nimbus" for another button.. I dont know how to implement the .setUI() button of every swing component. i read the API and it says that .setUI() and .getUI(), sets and returns the look and feel of a ...

42. Change LookAndFeel in Realtime    coderanch.com

Hello everybody, I am using two different skins from the Synthetica Look And Feel range. They both do a beautiful job. I have programed a MenuItem whereby a user can switch between them in realtime. It works, but only the first time. When the user wants to switch back to the previous skin, the command does not work and the second ...

43. look and feel issue    coderanch.com

45. Change LookAndFeel in individual Swing components    coderanch.com

Here's a method that I made if anyone's interested. I had some trouble at first but I got it working. public static void fileDiag() { FileDialog fd = new FileDialog(new Frame(),"",FileDialog.LOAD); String fileString = null; fd.setVisible(true); if((fd.getDirectory() != null) && (fd.getFile() != null)) fileString = fd.getDirectory() + fd.getFile(); } Simply modify the code so that fileString is passed to the file ...

46. Changing Look and Feel Dynamically    coderanch.com

47. How to set Look and Feel ?    coderanch.com

Hi, Using Netbeans: I am trying to get a GUI window to look correct on windows XP at the moment it is using "Metal" as its default window. I have searched on the internet and found code thats supposed to change it but it doesn't work ? If you could assist me i would be grateful. Regards Gary package javaapplication14; import ...

48. Issue with setting different Look and Feel in a Single Application    coderanch.com

I am having a Frame named Frame1 and I am setting a look and feel L&F1. Now in frame1, on clicking to a menu event and new Frame named Frame2 opens and there I set a look and feel L&F2. Now I found that this kind of scenario is breaking the Frame1 and entire Frame1 gets hang How to resolve this ...

49. Weird System Look and Feel behaviour    coderanch.com

I've written a handy method to frame a panel so I can test how it looks, but what I'm finding is that when I try to call it, on the first window that comes up, the JButtons don't have the correct look and feel. Subsequent windows are OK. I thought maybe the look and feel wasn't loading fully before the frame ...

50. Look&Feel Switch Glitch    coderanch.com

I am using the Synthetica range of Look & Feel products, which are brilliant, especially with 4 processors, and 4 G of memory. The problem I have is when switching to another Look & Feel in the same product range. I have configured settings to have rounded corners in my JFrames. When the program starts, the rounded corner works, but when ...

51. setting look and feel in Swing app after startup    coderanch.com

I want to change the look and feel of a Swing application under user control. I have the following code that almost works import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.plaf.metal.DefaultMetalTheme; import javax.swing.plaf.metal.MetalLookAndFeel; import javax.swing.plaf.metal.MetalTheme; import napkin.NapkinLookAndFeel; public class SSCE extends JFrame implements ...

52. About look and feel    java-forums.org

53. how to have the steel L&F    java-forums.org

54. Look and Feel of GUI    java-forums.org

The code is import java.awt.event.*; import java.io.File; import javax.swing.*; public class CurveFitting extends JFrame implements ActionListener, FocusListener{ /** * @param args */ public CurveFitting() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{ super("My GUI"); //code to add components pack(); setVisible(true); UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel"); setDefaultCloseOperation(javax.swing.WindowConstan ts.EXIT_ON_CLOSE); } p public void actionPerformed(ActionEvent e) { //to perfom some action } public static void main(String[] args) throws ClassNotFoundException, InstantiationException, ...

55. How to use jTattoo Look and Feel    java-forums.org

56. Look And Feel    java-forums.org

57. Problem in LookAndFeel    java-forums.org

I m using jTataoo LAF by last couple of months it works very well when I create a jar file of my application if the jTataoo.jar file is placed in "jre\lib\ext" folder but if it is removed my application jar file says "java.lang.ClassNotFoundException:" while the jTattooDemo.jar file works well can any one tell me how to make my application free from ...

58. Look and Feel Headaches    java-forums.org

Hi people, I am developing a frame and I want to remove the OS title panel and borders. So I call the function setUndecorated(true) to disable the native decorators. If nothing is missing me, I think I can set all the window events again (like closing, maximize, etc. to the new buttons on the new top panel) but I am aware ...

59. Java Look and Feel    java-forums.org

import java.awt.*; import javax.swing.plaf.basic.*; import javax.swing.*; import java.awt.event.*; import java.lang.*; public class exam extends JFrame implements ActionListener { JButton def_but=new JButton("Default Look And Feel.."); JButton sys_but=new JButton("System Look And Feel.."); JButton mot_but=new JButton("Motif LookAndFeel.."); exam() { super("Look And Feel"); setLayout(null); def_but.setBounds(10,10,180,30); def_but.addActionListener(this); add(def_but); sys_but.setBounds(10,50,180,30); sys_but.addActionListener(this); add(sys_but); mot_but.setBounds(10,90,180,30); mot_but.addActionListener(this); add(mot_but); setSize(500,600); setVisible(true); setDefaultCloseOperation(2); } public void actionPerformed(ActionEvent e) { if(e.getSource().equals(mot_but)) { try ...

60. Look and Feel    java-forums.org

62. Problem with Look And Feel    java-forums.org

63. Need help making custom look and feel    java-forums.org

64. change Look and feel in Netbeans 6.8    java-forums.org

Hi Eranga, many thanks for your advance. Few years ago, I usually insert this code to the first call in main() method and no problem. Now I try to insert code to before initComponent() method as you said and success. Sorry for my bad knowledge. Can you mark [SOLVED] to this topic? I can't edit the header's topic

65. Help on Look and Feel    java-forums.org

curmadgeon, Thanks for pointing me that. Now I understand it more. I thought that for every form I should put the code for LookandFeel that is why it made me think that the same code place in the same class was running good in the one form and not in the other. The LookandFeel was already fired when frmMain was shown ...

66. How to change Netbeans Java (project GUI) look and feel ?    java-forums.org

Hi Everytime i run my Java SE (swing) program it run with Metal Look and Feel, but my design is based on "Windows Look and Feel", how can I make it so that my default program running has windows look and feel and not "Java Metal". :mad: I searched a few placed but they all talk about how to change netbeans ...

67. look and feel in net beans    java-forums.org

i think this will help u import javax.swing.*; import java.awt.*; public class WindowUtilities { public static void setNativeLookAndFeel() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAn dFeelClassName()); } catch(Exception e) { System.out.println("Error setting native LAF: " + e); } } public static void setJavaLookAndFeel() { try { UIManager.setLookAndFeel(UIManager.getCrossPlatfor mLookAndFeelClassName()); } catch(Exception e) { System.out.println("Error setting Java LAF: " + e); } } public static void ...

68. Java Look & Feel: how to change default settings?    java-forums.org

Hello, I'm looking an easy way in Linux to edit default look and feel settings for all Java applications not calling UIManager explicitly. For example, how can I change default menu or text fonts, colors, etc.? I know about swing.properties but it is in the system directory and for this reason it is not suitable for user settings. Also, swing.properties just ...

69. Look and feel - TinyLaf    java-forums.org

70. Turn off look and feel    liferay.com

It is not possible to turn off look and feel, the portal-ext property you are trying to modify is to disallow users from modifying the look and feel aspects of the portal/portlet, i.e. to show or not to show the "pallette" icon on the portlet toolbar. If you can detail why you want to turn off the look and feel, then ...

71. MAC look & Feel of portlets    liferay.com

72. Liferay New Look and feel    liferay.com

73. Customize portlet Look and Feel options    liferay.com

Is there an out of the box way to customize the options in Look and Feel for a portlet? I know I can eliminate the Look and Feel option for certains roles in portlet.xml or totally eliminate the option in portal-ext.properties file. What I want to do for example is to not display the text styles tabs or change the options ...

74. Porlet Look and Feel, Etc. Links    liferay.com

I want to hide the links at the top of the portlets for Configuration, Look and Feel, Close, etc. How can I do that? If that's possible, how can portlets be removed from a page after those links are gone? Alternatively, hiding the links from all users that are not admins would be an acceptable solution.

75. How to turn off/on the Look and Feel component    liferay.com

Hi all, I am newcomer. Can anyone tell me how can do not allow Administrator to modify the look and feel, please? I wan to modify the portal-ext.properties to do that, but I cannot. ## ## Look and Feel ## # # Set the following to false if the system does not use allow users to # modify the look and ...

76. Re-skining or Creating custom look and feel    liferay.com

Hi, I am very much new in Liferay and I need to create custom look and feel or Re-skining the site. Could you anyone help from where I should start with? I have gone through the Portal Administrator's Guide as well but it didn't helped me much. I would like to know how and where I have to put my custom ...

77. [Custom Hook ]-Update Look and Feel    liferay.com

Hi to all, I have a problem of updating look and feel of organization pages created with custom hook. Each organization has 3 pages and I want that each one has a different theme. With the following line I set a theme for all pages and works correctly: LayoutSetLocalServiceUtil.updateLookAndFeel(group.getGroupId(), false, "minisite_1theme", "", "", false); But if I want to update look ...

78. Custom Portlet.VM Look & Feel    liferay.com

Hi, I have been searching on how to do this for awhile and couldn't find anything. I created my own theme in Liferay. I have overwritten portlet.vm with my own. In the original theme when i clicked on the configure -> Look and Feel on a portlet it would bring up another window that would allow me to customize the way ...

79. Look and Feel for Organization Users.    liferay.com

Hi, I am using liferay4.3 I Created an Organization and it contains some private pages and I assigned some users to custom roles. So my portlet have look and feel icon. If I have changed the look and feel in any portlet for any user it will affect to all other users belong to that organization. Is it possible to have ...

82. Look and Feel Option on Portlets Disappeared    liferay.com

We have a Liferay configuration running on 6.0.6 version and it has been drawn to my attention that the " look and feel" option on individual portlets has disappeared. No idea when this changed or what has caused it. Could it be anything to do with custom CSS being put on pages or theme plugins being loaded? Anybody know what could ...

83. Can i develop dashboards using ZK.. Which i can easily develop with flex..Do we get same look & feel    zkoss.org

Have taken a look at http://www.zkoss.org/zkdemo/userguide/ to see what all UI components are available? Go there and click Layouts and Windows on the top category bar, then select Portal Layout. And after your done with that, click all the categories on the top and the examples on the left. There's quite an array of examples.

84. DefaultTreeNode's different look and feel compared to SimpleTreeNode    zkoss.org

public boolean isLeaf() { return _children == null || _children.size() == 0; } public void add(TreeNode child) { if (_children == null) _children = new ArrayList(); super.add(child); } public void insert(TreeNode child, int index) { if (_children == null) _children = new ArrayList(); _children.add(index, child); super.insert(child, index); } public void remove(int index) { super.remove(index); _children.remove(index); } //@Override public void remove(TreeNode child) ...

85. Load on demand demo - ugly look and feel here - what's missing?    zkoss.org

I've tested your implementation of this demo local and the groups here are not collapsible at all. The look of them is just like a normal grid row, so how does this work with your implementation? For info I'm using 5.0.7.1 CE of ZK - this occurs in Chrome and Firefox 4.

86. Changing look and feel    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4257289 By: drjava2 New to ZK. Looks really great, a breath of fresh air. Some of the default UI elements' look and feel are a bit goofy though, like the standard OSX look of the tabs. What's up with that? So, I want to change the look of the tabs, and I understand there is no official documentation ...

87. Customizing Look and Feel, small talk,comment    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4883317 By: emiliano1976 Thanks a lot for the missing part !!! Now i face another problem. My custom look and Feel is ok when i use .zul files. But when i use Richlets my custom look and feel has no effect. I see components with their default look and feel. Do I have to do something different when ...

88. L&F of components and docs!    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=3574547 By: fernando_deleon Wow ZK is amazing..i was looking for something just like this..before i was looking at laszlo but..cuz of it being flash based it was a bit slow to load on the client...though the concept i really like! and here too with ZK the concept is the same! ;) and is better cuz it generates html ...

89. Adding specific LookAndFeel    forums.oracle.com

91. How to set Synthetica look and feel ?    forums.oracle.com

92. Look and Feel    forums.oracle.com

93. Look and feel, any drawbacks?    forums.oracle.com

94. L & F question    forums.oracle.com

Hello, Im new to java. I have a question regarding L&F. I try using L&F i.e. Metal. My question - is it possible to use Metal Look for frame and Use systems default (windows) for dialogs or new open frame? And also, Im using Netbeans 6.0 how do I get arround with updateComponentTreeUI(this); I placed it in JForm App and View ...

95. LookAndFeel not working    forums.oracle.com

if I'm not mistaken, the metal look and feel is the same as the java look and feel. hence, you're trying to change it to the look and feel that is already there. that's why it isn't changing. If I try to paint a red wall red, it won't change color either. - Adam

96. is it only possible to have one L&F per VM?    forums.oracle.com

Hey all, I am trying to call an application from another application. The two applications have two different look and feels set, however whenever I call the second application, it's look and feel takes over that of the calling application. Is this caused by the fact that there is only one UI manager per virtual machine?? Is there any way around ...

97. Problems whit the LookAndFeel    forums.oracle.com

98. changing look and feel    forums.oracle.com

99. Custom Look and Feels    forums.oracle.com

100. custom look and feel    forums.oracle.com

hey everybody, I am trying to make a program that requires a custom look and feel. How would i go about doing this? Thank you Sincerely, mk PS: I am in high school and still learning java...so i would appreciate if the explanation to be a little easier to understand. Thank you Edited by: bluejamesbond on Aug 23, 2010 6:48 PM ...