Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Font;
- import javax.swing.UIManager;
- import javax.swing.plaf.FontUIResource;
- public class MoreMethods1.java
- {
- public static String(String original, String edited)
- {
- String original = JOptionPane.showInputDialog("Enter a string:");
- String edited = original.substring(original.length()-2, str.length());
- return edited;
- }
- public static void changeJOP()
- {
- // Here are the commands to change the color & fonts in
- // the showMessageDialog() window:
- // The font of the message text
- UIManager.put("Label.font", new FontUIResource
- (new Font("Baskerville Old Face", Font.BOLD, 45)));
- // The color of the message text
- UIManager.put("OptionPane.messageForeground",new Color(72,61,139));
- // The color of the panel
- UIManager.put("Panel.background",new Color(205,197,191));
- // The color around the outside of the panel
- UIManager.put("OptionPane.background",new Color(124-252-0));
- // Buttons at bottom
- UIManager.put("Button.background",new Color(132,112,255));
- UIManager.put("Button.foreground", new Color(72,61,139));
- UIManager.put("Button.font", new FontUIResource
- (new Font("Tempus Sans ITC", Font.BOLD, 14)));
- }
- public static void main (String [] args);
- {
- changeJOP();
- System.out.println(public static String(String original, String edited));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement