Need help with a rock paper scissors GUI

i dont know whats wrong, for some reason the String "human" or String "player" is not responding so i keep getting an error also if anyone can PLZ help me set color for the labels
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Scanner;
import java.util.Random;
public class RPSPanel extends JPanel
   private JLabel inputLabel, outputLabel, resultLabel, statementLabel, newlabel, titlelabel, copyrightlabel;
   private JTextField player;
   private JButton input;
   public RPSPanel()
      titlelabel = new JLabel ("**************************Rock Paper Scissors v1.52.22*************************");     
      inputLabel = new JLabel ("Enter Rock Paper or Scissors :");
      outputLabel = new JLabel ("Computers Choice: ");
      player = new JTextField (9);
      resultLabel = new JLabel ("-----------");
      statementLabel = new JLabel("---------------------------------------------------------------------");
      newlabel = new JLabel("*******************************************************************************");
      copyrightlabel = new JLabel("copyright 2007. msg inc");
      input = new JButton ("PLAY!");
      input.addActionListener (new playerlistener());
      add (titlelabel);
      add (inputLabel);
      add (player);
      add (outputLabel);
      add (resultLabel);
      add (statementLabel);
      add (input);
      add (newlabel);
      add (copyrightlabel);
      setPreferredSize (new Dimension(300, 175));
      setBackground (Color.black);
   private class playerlistener implements ActionListener
      public void actionPerformed (ActionEvent event)
         Random generator = new Random();     
    int lol;
    String human = player.getText();
    String comp = "";
    String result = "";
         lol = generator.nextInt(3) + 1;
       switch (lol)
             case 1:
             comp = "rock";
             break;
             case 2:
            comp = "paper";
            break;
            case 3:
            comp = "scissors";     
             break;
         if(comp.equals(human))
           statementLabel.setText("---------------------------tie. try again-------------------------------------");
         if(human.equals("rock") && comp.equals("paper"))
              statementLabel.setText("------------------------paper beats rock. YOU SUCK!-------------------------");
         if(human.equals("rock") && comp.equals("scissors"))
          statementLabel.setText("--------------------------rock beats scissors. is very nice---------------------------");
         if(human.equals("paper") && comp.equals("rock"))
           statementLabel.setText("--------------------------paper beats rock. you win--------------------------");
         if(human.equals("paper") && comp.equals("scissors"))
            statementLabel.setText("---------------------scissors beats paper. you n00b-----------------------");
         if(human.equals("scissors") && comp.equals("rock"));
             statementLabel.setText("----------------------rock beats scissors. owned----------------------------");
         if(human.equals("scissors") && comp.equals("paper"))
            statementLabel.setText("----------------------scissors beats paper. you win-----------------------");
         else
            statementLabel.setText("---------------------------------error----------------------------------");   
         resultLabel.setText(comp);
}Message was edited by:
msg256

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Scanner;
import java.util.Random;
public class RPS extends JPanel
   private JLabel inputLabel, outputLabel, resultLabel,
                  statementLabel, newlabel, titlelabel, copyrightlabel;
   private JTextField player;
   private JButton input;
   public RPS()
      titlelabel = getLabel ("**************************Rock Paper Scissors v1.52.22*************************");     
      inputLabel = getLabel ("Enter Rock Paper or Scissors :");
      outputLabel = getLabel ("Computers Choice: ");
      player = new JTextField (9);
      resultLabel = getLabel ("-----------");
      statementLabel = getLabel("---------------------------------------------------------------------");
      newlabel = getLabel("*******************************************************************************");
      copyrightlabel = getLabel("copyright 2007. msg inc");
      input = new JButton ("PLAY!");
      input.addActionListener (new PlayerListener());
      add (titlelabel);
      add (inputLabel);
      add (player);
      add (outputLabel);
      add (resultLabel);
      add (statementLabel);
      add (input);
      add (newlabel);
      add (copyrightlabel);
      setPreferredSize (new Dimension(300, 175));
      setBackground (Color.black);
   private JLabel getLabel(String s)
      JLabel label = new JLabel(s);
      label.setForeground(Color.red);
      return label;
   private class PlayerListener implements ActionListener
      Random generator = new Random();
      public void actionPerformed (ActionEvent event)
         String human = player.getText().toLowerCase();
         String comp = "";
         String dash = "---------------";
         int lol = generator.nextInt(3) + 1;
         switch (lol)
            case 1:
               comp = "rock";
               break;
            case 2:
               comp = "paper";
               break;
            case 3:
               comp = "scissors";
               break;
            if(comp.equals(human))
               statementLabel.setText(dash + "tie. try again" + dash);
         else if(human.equals("rock") && comp.equals("paper"))
            statementLabel.setText(dash + "paper beats rock. YOU SUCK!" + dash);
         else if(human.equals("rock") && comp.equals("scissors"))
            statementLabel.setText(dash + "rock beats scissors. is very nice" + dash);
         else if(human.equals("paper") && comp.equals("rock"))
            statementLabel.setText(dash + "paper beats rock. you win" + dash);
         else if(human.equals("paper") && comp.equals("scissors"))
            statementLabel.setText(dash + "scissors beats paper. you n00b" + dash);
         else if(human.equals("scissors") && comp.equals("rock")) // << ";" !
            statementLabel.setText(dash + "rock beats scissors. owned" + dash);
         else if(human.equals("scissors") && comp.equals("paper"))
            statementLabel.setText(dash + "scissors beats paper. you win" + dash);
         else
            statementLabel.setText(dash + "error" + dash);   
         resultLabel.setText(comp);
   public static void main(String[] args)
      JFrame f = new JFrame();
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.getContentPane().add(new RPS());
      f.pack();
      f.setVisible(true);
}

Similar Messages

  • I need help with a basic rock paper scissors program!

    i need to make a program that allows the computer to play rock paper scissors at random and compare the results with user and tell who wins or if its a tie. can anyone help me?

    import java.util.Scanner;
    import java.util.Random;
    public class RockPaperScissors
    public static final int ROCK = 1;
    public static final int PAPER = 2;
    public static final int SCISSORS = 3;
    public static void main(String[] args)
    final int NUM_CHOICES = 3;
    Random generator = new Random();
    int userWins = 0;
    int compWins = 0;
    int ties = 0;
    int compChoice, userChoice;
    boolean exit = false;
    Random randGen = new Random();
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter your choice: ");
    userChoice = scan.nextInt();
    System.out.println("Computers Choice: ");
    compChoice = scan.nextInt();

  • Help with getting Images to show in a Rock, Paper, Scissors game

    Hi
    I am working on this Rock, paper, scissors java game and the program works, but I can not figure out how to get the images to load onto the program. So my question is how do I get the images to load up with the program? I am using JCreator for this project. I have created the Basic Java Application project, and then added in the 3 .java files that I need to run the program, but I just can not figure out how or where I need to upload the files. The game works without the images, but I would really like them to show up.
    This is the .java file that calls up the images:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class pss extends JPanel implements ActionListener, ItemListener
    private final Color clrBackground = new Color(163,243,255);
    private final Color clrForeground = new Color(0,0,0);
    private JComboBox cboxWeapon;
    private JTextField txtCPUWeapon, txtWins, txtLoses, txtDraws;
    private JLabel lblPlayerWeapon, lblCPUWeapon, lblWins, lblLoses, lblDraws, lblStatus, lblPlayerWeaponIcon, lblCPUWeaponIcon;
    private JButton cmdPlay, cmdReset;
    private ImageIcon[] imgWeapon;
    private JPanel panRoot, panPlayerArea, panPlayerWeapon, panCPUArea, panCPUWeapon, panStatusArea, panGo, panCounters, panWins, panLoses, panDraws;
    private pssEngine engine = new pssEngine();
    private objCreateAppletImage createImage = new objCreateAppletImage();
    private boolean errorWithImages = false;
    public static void main(String[] args) //With applications, you have to specify a main method (not with applets)
    JFrame.setDefaultLookAndFeelDecorated(true); //Make it look nice
    JFrame frame = new JFrame("Paper Stone Scissors"); //Title
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setResizable(false); //Stops the user resizing the window
    JComponent paneMain = new pss();
    paneMain.setOpaque(true);
    paneMain.setPreferredSize(new Dimension(420,350));
    frame.setContentPane(paneMain);
    frame.pack();
    frame.setVisible(true);
    public pss ()
    cboxWeapon = new JComboBox(engine.getWeapon());
    cboxWeapon.addItemListener(this);
    txtCPUWeapon = new JTextField(engine.getStrCPUWeapon(), 5);
    txtWins = new JTextField("0", 5);
    txtLoses = new JTextField("0", 5);
    txtDraws = new JTextField("0", 5);
    txtCPUWeapon.setEditable(false);
    txtWins.setEditable(false);
    txtLoses.setEditable(false);
    txtDraws.setEditable(false);
    lblPlayerWeapon = new JLabel("Choose your weapon", JLabel.CENTER);
    lblCPUWeapon = new JLabel("The CPU's weapon", JLabel.CENTER);
    lblWins = new JLabel("Amount of wins:", JLabel.RIGHT);
    lblLoses = new JLabel("Amount of loses:", JLabel.RIGHT);
    lblDraws = new JLabel("Amount of Drawss:", JLabel.RIGHT);
    lblStatus = new JLabel("", JLabel.CENTER);
    lblPlayerWeaponIcon = new JLabel("", JLabel.CENTER);
    lblCPUWeaponIcon = new JLabel("", JLabel.CENTER);
    lblPlayerWeaponIcon.setPreferredSize(new Dimension(150,150));
    lblCPUWeaponIcon.setPreferredSize(new Dimension(150,150));
    cmdPlay = new JButton("Go!");
    cmdReset = new JButton("Restart");
    cmdPlay.addActionListener(this);
    cmdReset.addActionListener(this);
    try
    imgWeapon = new ImageIcon[3];
    for (int i = 0; i < 3; i++)
    imgWeapon[i] = createImage.getImageIcon(this, ".src/images/" + engine.getWeapon(i) + ".gif", "Icon for " + engine.getWeapon(i), 13000);
    lblPlayerWeaponIcon.setIcon(imgWeapon[0]);
    lblCPUWeaponIcon.setIcon(imgWeapon[0]);
    catch (Exception ex) //The game works without the images, so carry on
    errorWithImages = true;
    setLayout(new BorderLayout());
    panRoot = new JPanel(new BorderLayout());
    panPlayerArea = new JPanel(new BorderLayout());
    panPlayerWeapon = new JPanel(new BorderLayout());
    panCPUArea = new JPanel(new BorderLayout());
    panCPUWeapon = new JPanel(new BorderLayout());
    panStatusArea = new JPanel(new BorderLayout());
    panGo = new JPanel();
    panCounters = new JPanel(new GridLayout(3,1,2,2));
    panWins = new JPanel();
    panLoses = new JPanel();
    panDraws = new JPanel();
    add(panRoot, BorderLayout.CENTER);
    panRoot.add(panPlayerArea, BorderLayout.WEST);
    panPlayerArea.add(panPlayerWeapon, BorderLayout.NORTH);
    panPlayerWeapon.add(lblPlayerWeapon, BorderLayout.NORTH);
    panPlayerWeapon.add(cboxWeapon, BorderLayout.SOUTH);
    panPlayerArea.add(lblPlayerWeaponIcon, BorderLayout.SOUTH);
    panRoot.add(panCPUArea, BorderLayout.EAST);
    panCPUArea.add(panCPUWeapon, BorderLayout.NORTH);
    panCPUWeapon.add(lblCPUWeapon, BorderLayout.NORTH);
    panCPUWeapon.add(txtCPUWeapon, BorderLayout.SOUTH);
    panCPUArea.add(lblCPUWeaponIcon, BorderLayout.SOUTH);
    panRoot.add(panStatusArea, BorderLayout.SOUTH);
    panStatusArea.add(panGo, BorderLayout.NORTH);
    panGo.add(cmdPlay);
    panGo.add(cmdReset);
    panGo.add(lblStatus);
    panStatusArea.add(panCounters, BorderLayout.SOUTH);
    panCounters.add(panWins);
    panWins.add(lblWins);
    panWins.add(txtWins);
    panCounters.add(panLoses);
    panLoses.add(lblLoses);
    panLoses.add(txtLoses);
    panCounters.add(panDraws);
    panDraws.add(lblDraws);
    panDraws.add(txtDraws);
    panRoot.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    setBackground(clrBackground);
    panRoot.setBackground(clrBackground);
    panPlayerArea.setBackground(clrBackground);
    panPlayerWeapon.setBackground(clrBackground);
    panCPUArea.setBackground(clrBackground);
    panCPUWeapon.setBackground(clrBackground);
    panStatusArea.setBackground(clrBackground);
    panGo.setBackground(clrBackground);
    panCounters.setBackground(clrBackground);
    panWins.setBackground(clrBackground);
    panLoses.setBackground(clrBackground);
    panDraws.setBackground(clrBackground);
    lblPlayerWeapon.setForeground(clrForeground);
    lblCPUWeapon.setForeground(clrForeground);
    lblWins.setForeground(clrForeground);
    lblLoses.setForeground(clrForeground);
    lblDraws.setForeground(clrForeground);
    txtWins.setForeground(clrForeground);
    txtLoses.setForeground(clrForeground);
    txtDraws.setForeground(clrForeground);
    txtCPUWeapon.setForeground(clrForeground);
    public void reset ()
    cboxWeapon.setSelectedIndex(0);
    lblStatus.setText("");
    engine.reset();
    public void actionPerformed (ActionEvent e)
    if (e.getSource() == cmdReset)
    reset();
    else
    lblStatus.setText(engine.play(cboxWeapon.getSelectedIndex()));
    txtCPUWeapon.setText(engine.getStrCPUWeapon());
    txtWins.setText(Integer.toString(engine.getWins()));
    txtLoses.setText(Integer.toString(engine.getLoses()));
    txtDraws.setText(Integer.toString(engine.getDraws()));
    if (!errorWithImages)
    lblCPUWeaponIcon.setIcon(imgWeapon[engine.getCPUWeapon()]);
    public void itemStateChanged (ItemEvent e)
    if (!errorWithImages)
    lblPlayerWeaponIcon.setIcon(imgWeapon[cboxWeapon.getSelectedIndex()]);
    }Here is the other .java file that calls on the Images:
    import java.awt.*;
    import java.io.*;
    import javax.swing.ImageIcon;
    public class objCreateAppletImage
    public void objCreateAppletImage ()
    //If an error occurs (or is thrown by me) it will be thrown to the next level up, and either caught or thrown
    public ImageIcon getImageIcon (Object parentClass, String path, String description, int fileSize) throws Exception
    int count = 0;
    BufferedInputStream imgStream = new BufferedInputStream(parentClass.getClass().getResourceAsStream(path));
    byte buff[] = new byte[fileSize];
    if (imgStream == null) //If doesn't exist
    throw new Exception("File not Found");
    try
    count = imgStream.read(buff);
    imgStream.close(); //Closes the stream
    catch (IOException ex)
    throw new Exception("Corrupt file");
    return new ImageIcon(Toolkit.getDefaultToolkit().createImage(buff), description); //Creates the image from the byte array
    }Could someone please help me? I really have no idea and I would like this to work.
    Thank you
    Frank

    Oh, thank you. I will not do that in the future.
    I am not entirely sure how I would use the getImage method in an Applet. I would prefer to just use the code that I have currently, unless the addition of making the program an Applet only adds a small amount of code. But then even still, I am not entirely sure what I would write in the .class file to make the images load. And then I would not really know how to properly incorporate the pss.java file and the .class file together so they read off of each other.

  • Help with Rock, Paper, Scissors Program

    I need some help with my program, I got understand writing each of the methods I have to do but then i don't understand how to piece it together to make the program work. in the main method...I didn't complete the scrolling message method I just wanted to get the game itself working first then I was going to complete that method. I just need to know if I'm heading in the right direction or if i did something completly wrong
    import javax.swing.*;
    public class RockPaperScissors
         public static void displayScrollingMessage (String list)
              String header = "Game #\tUser\tComputer\tWinner\t";
         public static void getUserChoice ( )
              int game = 1;
              for ( game = 1; game > 0 ; game ++)
                   String input = JOptionPane.showInputDialog ("Choose Rock, Paper, or Scissors\n Enter\n 1 for Rock" +
                                                                                              "\n2 for Paper\n3 for Scissors\n4 to Exit");
                   String list = "   ";
                   int option = Interger.parseInt (input);
                   switch (option)
                        case 1:
                                  int userChoice = 1;
                                  getComputersChoice ();
                                  itemName (userChoice);
                                  itemName2 (computersChoice);
                                  whowins (userChoice, computersChoice);
                                  winnerName (winner);
                                  winlose (winner);
                                  String list =+ game + "/t" + itemName + "\t" + itemName2 + "\t" + winnerName + "\n";
                                  String winner = JOptionPane.showOutputDialog (null, "You picked " + itemName + " and the computer picked "
                                                                                                                  + itemName2 + "\nTherefore " + winlose);
                                  return userChoice;
                                  break;
                        case 2:
                                  userChoice = 2;
                                  getComputersChoice ();
                                  itemName (userChoice);
                                  itemName2 (computersChoice);
                                  whowins (userChoice, computersChoice);
                                  winnerName (winner);
                                  winlose (winner);
                                  String list =+ game + "\t" + itemName + "\t" + itemName2 + "\t" + winnerName + "\n";
                                  String winner = JOptionPane.showOutputDialog (null, "You picked " + itemName + " and the computer picked "
                                                                                                                  + itemName2 + "\nTherefore " + winlose);
                                  return userChoice;
                                  break;
                        case 3:
                                  userChoice = 3;
                                  getComputersChoice ();
                                  itemName (userChoice);
                                  itemName2 (computersChoice);
                                  whowins (userChoice, computersChoice);
                                  winnerName (winner);
                                  winlose (winner);
                                  String list =+ game + "\t" + itemName + "\t" + itemName2 + "\t" + winnerName + "\n";
                                  String winner = JOptionPane.showOutputDialog (null, "You picked " + itemName + " and the computer picked "
                                                                                                                  + itemName2 + "\nTherefore " + winlose);                              
                                  return userChoice;
                                  break;
                        case 4:
                                  break;
                        default:
                             JOptionPane.showMessageDialog (null, "Error!! Please enter a valid option!"
                                                                                              , JOptionPane.WARNING_MESSAGE);
                        break;
         public static int getComputersChoice ()
              int computersChoice = (int) (3 * Math.random() + 1);
              return computersChoice;
         public static String itemName (int userChoice)
              if (userChoice == 1)
                   String itemName = Rock;
              else
                   if (userChoice == 2)
                        String itemName = Paper;
                   else
                        if (userChoice == 3)
                             String itemName = Scissors;
              return itemName;
              public static string itemName2 (int computersChoice)
              if (computersChoice == 1)
                   String itemName2 = Rock;
              else
                   if (computersChoice == 2)
                        String itemName2 = Paper;
                   else
                        if (computersChoice == 3)
                             String itemName2 = Scissors;
              return itemName2;
         public static string winlose (int winner)
              if (winner == 1)
                   winlose = "You Win!!!";
              else
              if (winner == 2)
                   winlose = "You Lose!!";
              else
              if (winner == 3)
                   winlose = "Its a Tie!!";
         return winlose;
         public static string winnerName (int winner)
              if (winner == 1)
                   String winnerName = "User";
              else
              if (winner == 2)
                   String winnerName = "Computer";
              else
              if (winner == 2)
                   String winnerName = "Tie";
              return winnerName;
         public static void whoWins (int computersChoice, int userChoice)
              if (userChoice == 1 && computersChoice == 1)
                   int winner = 3;
              else
              if (userChoice == 1 && computersChoice == 2)
                   int winner = 2;
              else
              if (userChoice == 1 && computersChoice == 3)
                   int winner = 1;
              else
              if (userChoice == 2 && computersChoice == 1)
                   int winner = 1;
              else
              if (userChoice == 2 && computersChoice == 2)
                   int winner = 3;
              else
              if (userChoice == 2 && computersChoice == 3)
                   int winner = 2;
              else
              if (userChoice == 3 && computersChoice == 1)
                   int winner = 2;
              else {
              if (userChoice == 3 && computersChoice == 2)
                   int winner = 1;
              else
              if (userChoice == 3 && computersChoice == 3)
                   int winner = 3;
              return winner;
         public static void main (String args [])
              getUserChoice ( );
              System.exit (0);
    }

    Here's something to compare to
    import javax.swing.*;
    public class RockPaperScissors
      public RockPaperScissors()
        String[] pick = {"Rock","Paper","Scissors","Exit"};
        int user = 0, computer = 0;
        String result = "", output = "";
        while(user < 3)
          user = JOptionPane.showOptionDialog(null,"Which do you want?",
                               "Rock-Paper-Scissors",-1,-1,null,pick,"");
          if(user == 3) break;
          computer = (int)(3*Math.random());
          result = getWinner(user,computer);
          output = "You chose "+pick[user] + "\nComputer chose " + pick[computer]+
                   "\n\nResult:- " + result;
          JOptionPane.showMessageDialog(null,output);        
        System.exit(0);
      public String getWinner(int player, int comp)
        if(Math.abs(player - comp) > 1)
          if(player == 2) player = -1;
          if(comp == 2) comp = -1;
        return player > comp? "You win.":player < comp? "Computer wins.":"Tie.";
      public static void main(String[] args){new RockPaperScissors();}
    }

  • Rock, Paper, Scissors query?

    Hi there, I have a "limiting" question I'm hoping someone can help me out with.
    I work for a hospital on the employee's database. I'm trying to update a column in the employee demographic table called "workgroup". It's never been used before so currently the column sits empty.
    I need to place one of 3 different codes in that column based on the level of patient contact the employee has. D = Direct contact, I = Indirect contact and N = No contact.
    I will need to base this off of another table called Exposures. It's a table that tracks the level of exposure the employee is subjected to. So ER nurses would be Level 1, but the cleaning crew are Level 3.
    Here's my problem, unfortunately due to poor past practices, many people are in more than one Level. For example, most nurses are in both Level 1 and Level 2. The reason for this... I have no idea.
    So my question is, how if say Sara Johnson was in Level 1 and Level 2, would I place a "D" in her workgroup column and that's it. I've built a script with a CASE statement but that doesn't give me what I want. I gives her both a "D" and an "I". But the "D" is more important - it trumps the "I". Get it? Basically it's like rock paper scissors.

    MIN worked great!! Thanks a lot!! I think this just saved us a lot of manual excel work.
    Here's the script: (sorry about the formatting)
    SELECT     E.ID, E.LNAME, E.FNAME, NVL(E.MI,' ') MI, E.BDATE,
         MIN(B.CODE) CODE, MIN(B.WKGP) WKGP,
         L.DESCR
    FROM     EMPLOYEE E, LOC L,     (SELECT     EMPLOYEE EE, EXPOSURE CODE,
                             CASE      WHEN EXPOSURE = 'Level 1' THEN 'D'
                                  WHEN FLDEXPOSURE = 'Level 2' THEN 'I'
                                  WHEN FLDEXPOSURE = 'Level 3' THEN 'N'
                                  ELSE     ' '
                             END WKGP
                        FROM     EXPHIST
                        WHERE     FLDEXPOSURE IN ('Level 1','Level 2','Level 3')) B
    WHERE     E.LOC = L.CODE          AND
         L.CODE = 'South'      AND
         E.STATUS IN     (SELECT CODE
                   FROM     EMPSTATS
                   WHERE     ACTIVE <> 'n')     AND
         E.REC_NUM = B.EE
    GROUP BY E.ID, E.LNAME, E.FNAME, E.MI, E.BDATE,
         L.DESCR
    ORDER BY E.LNAME, E.FNAME

  • Need help with duplicate print jobs over network that I can't cancel

    I have the Photosmart Premium All-in-One on my home network.  My kids who each have laptop running Windows 7 and are connected via wireless to the printer via a DLINK DIR-655.
    They hit the print button too many times and it keeps printing over and over again.
    Is there a way to get the printer to stop printing these duplicates.  I tried turning off/on but they just keep printing.
    We're wasting paper/ink and I need help with a solution.
    Please let me know.  Thanks.
    Angelo

    There should be a button with a red 'X' on it on the front of the printer.  This is the print cancel button.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Need help with Page Layout and Background Scaling

    hello, everyone.
    I am in the process of designing a new website for myself,
    and while I was researching nicely designed pages to use as
    inspiration, I stumbled upon this site:
    http://www.jeffsarmiento.com/
    obviously, the design is very impressive, but it also
    incorporates a lot of web mechanics that I have been trying to
    figure out, so I will use this page as an example.
    one thing I need help with is backgrounds. as you can see in
    the posted website, the creator used a seamlessly tiled paper
    texture to display the bulk of his content on. also make not of the
    pattern that is located to the left of the paper texture. how do I
    create seamless backgrounds like this that will scale to fit any
    amount of content or any resolution? I can't imagine that the guy
    that made that site created a new size background every time he
    made an update, so there has to be an easier way.
    the second thing that I am having trouble with is general
    site layout. I have read that most sites used series of invisible
    tables to organize there content, but when I open the source of
    this page in dreamweaver, he was using something different. div
    tags? should I be using these? who do I use them? are there any
    general layout tips that someone could pass on to me? perhaps a
    link to a good tutorial?
    please help me. i am very confused.
    thanks so much.

    IMO not a good site to emulate. To wit:
    Top background image:
    http://www.jeffsarmiento.com/images/bg-top.jpg;
    745px
    x 350px 137K
    Main background image:
    http://www.jeffsarmiento.com/images/bg-tile.jpg;
    745px x 950px 130K
    Total page size: 454K (Check here:
    www.websiteoptimization.com)
    Website usability experts routinely recommend a maximum page
    size of ~80K
    Check out the We We Scale @ www.FutureNowInc.com/wewe/ where
    they suggest,
    "You speak about yourself approximately 0,003 times as often
    as you speak
    about your customers. Might that have an impact on your
    effectiveness?"
    That is 100% consistent with the #1 Web Design mistake:
    "Believing people
    care about you and your web site." or to phrase more
    expansively, "Our site
    tries to tell you how wonderful we are as a company, but not
    how we're going
    to solve your problems."
    www.sitepoint.com has some excellent books on making a
    website actually
    attractive and usable at the same time.
    Walt
    "beWILLdered_" <[email protected]> wrote in
    message
    news:[email protected]...
    > hello, everyone.
    > I am in the process of designing a new website for
    myself, and while I was
    > researching nicely designed pages to use as inspiration,
    I stumbled upon
    > this
    > site:
    >
    http://www.jeffsarmiento.com/
    > obviously, the design is very impressive, but it also
    incorporates a lot
    > of
    > web mechanics that I have been trying to figure out, so
    I will use this
    > page as
    > an example.
    > one thing I need help with is backgrounds. as you can
    see in the posted
    > website, the creator used a seamlessly tiled paper
    texture to display the
    > bulk
    > of his content on. also make not of the pattern that is
    located to the
    > left of
    > the paper texture. how do I create seamless backgrounds
    like this that
    > will
    > scale to fit any amount of content or any resolution? I
    can't imagine that
    > the
    > guy that made that site created a new size background
    every time he made
    > an
    > update, so there has to be an easier way.
    > the second thing that I am having trouble with is
    general site layout. I
    > have
    > read that most sites used series of invisible tables to
    organize there
    > content,
    > but when I open the source of this page in dreamweaver,
    he was using
    > something
    > different. div tags? should I be using these? who do I
    use them? are there
    > any
    > general layout tips that someone could pass on to me?
    perhaps a link to a
    > good
    > tutorial?
    > please help me. i am very confused.
    >
    > thanks so much.
    >

  • I need help with my bill

    We have put together a few FAQs to help with some of the questions you might have about your BT bill.
    Please click on the links below to find the answer you're looking for:
    I don’t understand my bill – what do all these charges mean?
    Help with my rental charges
    __ (i) Where can I find a breakdown of my BT rental charges?
    __ (ii) I recently changed my package and think I've been charged twice
    I need help with my bill
    Why is my bill higher than normal?
    I thought the calls in my Calling Plan were free - why have I been charged?
    Can I view my BT bill online at My BT?
    What do I do if I want to change or cancel my BT package?
    Check below for is a list of our archived billing posts:
    How to get the most from your online account
    Why go paper-free?
    Live Chat - Connect to a billing advisor
    Your Bill explained
    How to get the most from your MyBT account and reasons to go paperfree
    Stephanie
    Stephanie
    BTCare Community Manager
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post. If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

    Where can I find a breakdown of my BT rental charges?
     The rental charges (sometimes called service charges) shown on your bill are for line rental, plus any additional services such as Calling Features. You're charged for these in advance.
    You can view your current rental charges online when you sign up for My BT.
    I recently changed my package and think I've been charged twice
    When you change your telephone calling plan, calling feature, broadband or BT Vision package, you may get a bill that's confusing or looks like you've been charged twice.
    Don't worry, you won't be charged twice. We charge in advance for our services, so you'll see charges for both your old and new services on the bill, even though your old service has been cancelled. You'll be refunded what you paid in advance for your old service on the same bill that shows the advance charges for your new service.
    This can also happen when we rename or re-price our products and services. You should see that you've been refunded for the old product name and then charged the same price for the new product name.
    Example:
    Below is an example of what you might see if you change your package after your bill is issued.
    Mr. Smith is on the Unlimited Evening and Weekend Plan and is charged in advance for his service. This is shown on the bill he gets every three months.
    Mr. Smith's bill is issued on 1st May and will show the standard advance charges from 1st May to the 31st July, as shown below.
    On the May 23rd Mr. Smith calls BT to change from the Unlimited Evening and Weekend Plan to the Unlimited Anytime Plan. Because he's already been charged for the Unlimited Evening and Weekend Plan on the bill from the 1st May, the changes he's made will be shown on his next bill.
    When Mr. Smith's next bill is produced on 1st August, he can see the changes to his rental charges. You can see from the highlighted area on the bill pictured below that Mr. Smith has been refunded the charges he's paid in advance for his old Unlimited Evening and Weekend Plan.
    This refund is from the time Mr. Smith changed the package (23rd May) until the end of the previous billing period (31st July). The refunded amount shows as -£35.63.
    Stephanie
    BTCare Community Manager
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post. If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Need help with classes

    I''ve just started out with Java and I need help with my latest program.
    The program looks someting like this:
    public class MultiServer {
       public static void main(Straing[] args) {
          ServerGUI GUI = new ServerGUI();
    public class ServerGUI extends JFrame implements ActionListener {
       private TextArea textArea;
       public ServerGUI() {
          //setting up the JFrame and stuff like that
       public void actionPerformed(ActionEvent event) {
          if(button == addButton) {
             addGUI add = new addGUI();
    public class addGUI extends JFrame implements ActionListener {
        private TextField t1 = new TextField(25);
        public addGUI() {
          //setting up the JFrame and stuff like that
       public void actionPerformed(ActionEvent event) {
          if(button == printButton) {
             textArea.append("THIS DOES NOT WORK!");
    }   The problem is as follows: I want to be able to write text in the textArea in class ServerGUI from the class addGUI, but I can't. I hope you understand what I mean.
    How is this fixed? Please help me!

    public void actionPerformed(ActionEvent event) {
          if(button == addButton) {
             addGUI add = new addGUI(textArea);
    public class addGUI extends JFrame implements ActionListener {
        private TextArea textArea;
        public addGUI(TextArea textArea) {
            this.textArea = textArea;
        }/Kaj

  • Need help with this book problem...Pig game...can ANYONE help!??

    I need help with the following book problem...could someone write this code for me?? Thanks!!
    First design and implement a class called PairOfDice, composed of two six-sided Die objects. Using the PairOfDice class, design and implement a class to play a game called Pig. In this game, the user competes against the computer. On each turn, the current player rolls a pair of dice and accumulates points. The goal is to reach 100 points before your opponent does. If, on any turn, the player rolls a 1, all points accumulated for that round are forfeited and control of the dice moves to the other player. If the player rolls two 1s in one turn, the player loses all points accumulated thus far in the game and loses control of the dice. The player may voluntarily turn over the dice after each roll. Therefore the player must decide to either roll again (be a pig) and risk losing points, or relinquish control of the dice, possibly allowing the other player to win. Implement the computer player such that it always relinquishes the dice after accumulating 20 or more points in any given round.
    I realize this is a long code, so it would be greatly appreciated to anyone who writes this one for me, or can at least give me any parts of it. I honestly have no clue how to do this because our professor is a dumbass and just expects us to know how to do this...he doesn't teach us this stuff...don't ask. Anyways, thanks for taking the time to read this and I hope someone helps out!! Thank you in advance to anyone who does!!!

    Nasty comments? It's not a matter of not liking you, it's a matter of responding to the
    "I'ts everyone else's fault but mine" attitude of your post.
    If you are genuine, the program is very easy to write, so, your Professor is correct when he said you should
    be able to do it. I'm still very much in the beginner category at java, and it took me only 20 mins to write
    (+5 mins to design it on paper). 2 classes in one file < 100 lines. Most of the regulars here would do it in half the time / half the lines.
    All of the clues are in the description, break them down into their various if / else conditions. Write it down on paper.
    Have a go. Try to achieve something. Post what you've tried, no-one will laugh at you, and you will be
    pleasanty surprised at the level of help you will get when you've "obviously" made some effort.
    Again, have a go. If you don't like problem-solving, then you don't like programming. So, you gotta ask
    yourself - "what am I doin' here?"

  • Need help with a currently "in-use" form we want to switch to Adobes hosting service

    Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of.  I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our  "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit"  issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
    We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
    I need to get this right and working for the majority of my users and on any platform and OS.
    You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
    (and you will probably get right to me, unlike my and I'm sure most other folks',  "Adobe phone-in experiences")
    Thank You,
    Michael Corman
    VinylCouture
    Phenix City, Alabama  36869

    Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
    So  I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself,  I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products"  to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
    OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi  & so on)...and if you are still on my site.. go to any  "GO RIGHT TO OUR ORDER PAGE"  button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is,  how do they select their individual colors within that (whatever) pack?... .
    So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a  " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
    So after thinking this all out,  and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
    Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year,  I think...its called http://pdf-fillableforms.com/.
    A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however,  if you're on MAC OSX or similar...
    I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
    OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending"  with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly,  and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add)..,  except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form....  Many folks report to us the following issues that we know of.  First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
    Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
    It almost always generates some kind ( at least one time)  of "error message" which we do warn them about..., telling one,  basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it...  and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
    Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly,  the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4)  If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
    Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that?  Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
    Michael Corman
    VinylCouture.com
    (706) 326-7911

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Need help with trim and null function

    Hi all,
    I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
    Thanks

    Hi,
    Thanks for the reply. What am I doing wrong?
    SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
    (AL1.user_data_text,'XX')
    FROM Table
    I want the XX to appear in the same column as the
    trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
    What you're saying is:
    SELECT  trim ( SUBSTR (AL1.user_data_text, 1, 3))
    ,       NVL ( AL1.user_data_text, 'XX' )
    FROM    Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
    If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
    SELECT  NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
                , 'XX'
    FROM    Table

  • I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in?

    I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in? When I try to press online the same thing pops up and I have no way of logging in or asking for help.

    Hi,
    iChat (it would help to know which version) can accept Apple IDs as valid AIM Screen Names.
    However if you have iChat 5 or earlier you cannot use ones ending in @me.com or @icloud.com issued by iCloud. (they can be used in iChat 6 or Messages as these versions make a double login to AIM and Apple to allow the use of the password).
    In addition if you are using an Apple ID for an AIM Screen Name the password still needs to keep to the 16 character limit that AIM has.
    AN @mac.com name can be used on any version of iChat  (Until the 30th June 2014)
    As it does not need a double check with Apple you can use it to log in to the AIM Web pages
    Login here with an AIM Name registered at AIM or and @mac.com name and see if you get any suspended account messages.
    Sometimes account can be suspended. Usually because something has triggered the "Unusual Activity" item.
    About a year ago many @mac.com users that travelled out of their own country found themselves suspended when they got home.
    If the Name checks out of if an Apple ID the password in known to be 16 characters or Less then do this:-
    In Lion upwards open a Finder Window and use the Go Menu whilst holding down the ALT key.
    Select the Library that appears in the menu list.
    Navigate to Preferences.
    (If you have version earlier than Lion the just navigate to ~/Library/Preferences (that's the Library in you Home - Little House icon - folder)
    Fnd com.apple.ichat.aim.plist (even if you are using Messages)
    Drag the file to the Trash and Restart the app.
    7:39 pm      Thursday; May 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

Maybe you are looking for