Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.38 KB | None | 0 0
  1. import java.awt.Color;
  2. import java.awt.Font;
  3.  
  4. import javax.swing.UIManager;
  5. import javax.swing.plaf.FontUIResource;
  6.  
  7. public class MoreMethods1.java
  8. {
  9.     public static String(String original, String edited)
  10.     {
  11.         String original = JOptionPane.showInputDialog("Enter a string:");
  12.         String edited = original.substring(original.length()-2, str.length());
  13.         return edited;
  14.     }
  15.      public static void changeJOP()
  16.      {
  17.         // Here are the commands to change the color & fonts in
  18.         // the showMessageDialog() window:
  19.        
  20.         // The font of the message text
  21.         UIManager.put("Label.font", new FontUIResource
  22.           (new Font("Baskerville Old Face", Font.BOLD, 45)));
  23.         // The color of the message text
  24.         UIManager.put("OptionPane.messageForeground",new Color(72,61,139));
  25.        
  26.         // The color of the panel
  27.         UIManager.put("Panel.background",new Color(205,197,191));
  28.         // The color around the outside of the panel
  29.         UIManager.put("OptionPane.background",new Color(124-252-0));
  30.        
  31.        
  32.         // Buttons at bottom
  33.         UIManager.put("Button.background",new Color(132,112,255));
  34.         UIManager.put("Button.foreground", new Color(72,61,139));
  35.         UIManager.put("Button.font", new FontUIResource
  36.           (new Font("Tempus Sans ITC", Font.BOLD, 14)));
  37.        
  38.      
  39.       }
  40.      
  41.     public static void main (String [] args);
  42.     {
  43.         changeJOP();
  44.         System.out.println(public static String(String original, String edited));
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement