look-and-feel

Qt custom look and feel?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 14:18:48
问题 can I force my Qt application to use different look and feel just like it is done in KDE ? 回答1: You can always change styles of widgets using QApplication::setStyle. There are a few predefined options available in Qt4. In main.cpp do something like this #include <QPlastiqueStyle> int main(int argc, char *argv[]) { [...] QApplication::setStyle(new QPlastiqueStyle()); } This way your application will alwyas look the same on different OS. In my opinion Plastique looks better under windowsXP/2000

How to deal with derived color in Nimbus Look and Feel?

一曲冷凌霜 提交于 2019-12-10 13:54:06
问题 What I want is to make the background of a uneditable text area the same as its disabled background. I know that the color is available from the UIManager with the key TextArea.disabled : DerivedColor(color=214,217,223 parent=control offsets=0.0,0.0,0.0,0 pColor=214,217,223 I firstly tried: textArea.setBackground(UIManager.getColor("TextArea.disabled")); It changed nothing at all and the background was still white. Then I tried: textArea.setBackground(new Color(UIManager.getColor("TextArea

Customizing JComboBox: “infinite loops event” when LAF is system LAF

余生颓废 提交于 2019-12-10 11:16:13
问题 I customize my JComboBox as follow. The program ran ok with default LAF, but whenever i changed the LAF to System LAF (another LAF, Nimbus, is ok), there was an infinite loop after the button was clicked. I saw that the actionPerformed method was called infinitely. Please help me solving this problem. I use jdk 1.6.0_33 I'm so sorry if there is any unclear mean. My English is not good Thanks in advance. package sig.dw.ui; import java.awt.Component; import java.awt.FlowLayout; import java.awt

Background color of button when using Windows LAF?

无人久伴 提交于 2019-12-10 09:48:24
问题 I have a Java application which uses the native LAF like so: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); This is working great, however, I am trying to make a button have a red background, but ends up like this: As you can see, I'm setting background and foreground on the button, but what results is not visually pleasing. Is there a way to have the button draw a red background without subclassing JButton? 回答1: You must understand that under Swing's Look & Feel

Java: Look and Feel

江枫思渺然 提交于 2019-12-10 03:26:44
问题 I am using Netbeans on a Windows machine, what happens is that if I run the main java file the look and feel I get is different than in the case I run the whole program. Meaning if I do this: I get But if I do this I get Did you see the difference in the look and feel of both the java outputs? Why is it there? I want that when I export it to Jar it should open like the 1st case, nice looking buttons. How? Update 1: I found the following code in the starting of my main: public static void main

Change text color of Substance LookAndFeel

人盡茶涼 提交于 2019-12-09 03:22:47
问题 I'm trying to change the text color of the Substance Look and Feel (in fact I'm using the SubstanceGraphiteGlassLookAndFeel . I don't know how to do that... 回答1: Ultimately you have to mess with the color schemes. Since you are using the Graphite Glass skin, messing with the color schemes is considerably easier since they values are not set in Java code. If you copy he file /org/pushingpixels/substance/api/skin/graphite.colorschemes into your classpath, you can go into the various scheme

Nimbus Look And Feel adjust colors of menubar

走远了吗. 提交于 2019-12-09 00:57:27
问题 I am trying to adjust the colors of the Nimbus Look and Feel but it is only working partially. Especially I have problems adjusting the colors of the menubar. Here is a running example: import java.awt.Color; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing

How to undecorate JFrame while using jtattoo

落爺英雄遲暮 提交于 2019-12-08 15:20:37
Although a similar question has been asked once before ( how to make frame undecorated after jTattoo theme installed ), but I'm unable to follow the solution to solve the problem. I didn't find the instruction is clear enough and hence failed many tries. I want an undecorated JFrame (and not only on fullscreen mode), but using any of the jtattoo themes unable me to do so. Is there any way I can get my JFrame to be undecorated while using a jtattoo theme? 来源: https://stackoverflow.com/questions/43034911/how-to-undecorate-jframe-while-using-jtattoo

How to undecorate JFrame while using jtattoo

ぃ、小莉子 提交于 2019-12-08 04:58:51
问题 Although a similar question has been asked once before (how to make frame undecorated after jTattoo theme installed), but I'm unable to follow the solution to solve the problem. I didn't find the instruction is clear enough and hence failed many tries. I want an undecorated JFrame (and not only on fullscreen mode), but using any of the jtattoo themes unable me to do so. Is there any way I can get my JFrame to be undecorated while using a jtattoo theme? 来源: https://stackoverflow.com/questions

Look-and-feel of an applet window changes on subsequent displays

丶灬走出姿态 提交于 2019-12-08 04:09:12
问题 I have an applet that displays a dialog box on click of a button. When the dialog box is first displayed, it is shown using the native look-and-feel of the OS. When the dialog box is displayed a second time (same page, browser, OS, etc.), it is shown using what I think is the Swing look-and-feel. To my knowledege, I do not explicity set the look-and-feel of my applet. Should I be doing so to avoid this inconsistent behavior? 回答1: Please elaborate what you mean by "display". A different screen