Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

change text color in joptionpane

import java.awt.*;
import javax.swing.*;

public class SetColor {
	public static void main(String[] args) {
		UIManager um = new UIManager();
		um.put("OptionPane.messageForeground", Color.red);
		um.put("Panel.background", Color.yellow);
		JOptionPane.showMessageDialog(null,"Hello","Set Color",
				JOptionPane.INFORMATION_MESSAGE);
	}
}
Comment

PREVIOUS NEXT
Code Example
Java :: java pause program until key pressed 
Java :: java float get 2 decimals 
Java :: play sound on button click android studio 
Java :: java read each lines in file 
Java :: last day of month from localdate java 
Java :: decomposer chaine de caractère java 
Java :: how to truncate an array in java 
Java :: paper api maven 
Java :: java check if divisible 
Java :: greatest common divisor java 
Java :: how to make a char uppercase in java 
Java :: android glide 
Java :: get boolean from string java 
Java :: generate a random phone number in java 
Java :: java string builder 
Java :: calculate mean from arraylist jaca 
Java :: sorting hashmap by key in java 8 
Java :: java math.random 
Java :: open camera in android 
Java :: android hide system bar programmatically 
Java :: eval in java 
Java :: Failed to determine a suitable driver class 
Java :: java find time between two dates 
Java :: java settimeout 
Java :: how to reverse a string in java 
Java :: binary to integer in java 
Java :: how to add elements to an empty array in java 
Java :: intent in fragment android 
Java :: inline arraylist initialization java 
Java :: datetimeformatter for java 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =