Search:

Type: Posts; User: kingsta

Search: Search took 0.06 seconds.

  1. Replies
    1
    Views
    2,484

    Bringing an image in front of another

    import javax.swing.*;

    import java.awt.*;

    public class ImageTutorial extends JFrame {

    private ImageIcon image;
    private JLabel label;
    private ImageIcon mario;
    private JLabel...
  2. Replies
    1
    Views
    1,066

    Array table question

    import javax.swing.JOptionPane;


    public class circle{
    //Instance variables
    /*
    * 2D array of chars for the board
    */

    public static void main(String[] args)
  3. Replies
    1
    Views
    884

    IF statement/Array

    /* *****************************************
    AUTHOR

    ******************************************** */

    import java.util.Arrays;
    import javax.swing.*; // import the swing library for I/O
    ...
  4. Replies
    2
    Views
    1,244

    Re: Adding two arrays

    Ok will do this, another problem with my code is that after the first loop it keeps going to the else statement rather than doing the first if statement when i enter a valid painting :s any ideas?...
  5. Replies
    2
    Views
    1,244

    Adding two arrays

    Hi I have this code that i've written, I was wondering how I would add 1 to my int[] scores array when a user inputs one of the paintings.
    For example: If the user enters "Mona Lisa" it would add 1...
  6. Replies
    3
    Views
    964

    Re: Why does my IF statement not work?

    Yeah I want the loop to keep going till the user exits. Will loop the paintings and see how i get on thanks.

    --- Update ---

    I've tried that and I'm still have trouble :/ Im not sure where to...
  7. Replies
    3
    Views
    964

    Why does my IF statement not work?

    /* *****************************************
    AUTHOR

    ******************************************** */

    import javax.swing.*; // import the swing library for I/O
    import java.util.*;

    public...
  8. Replies
    2
    Views
    961

    Re: String and IF statement

    Ok thanks, i've fixed it
  9. Replies
    2
    Views
    961

    String and IF statement

    String user1 = JOptionPane.showInputDialog("Please enter the first player's name"); //Ask's for the user's name
    String user2 = JOptionPane.showInputDialog("Please enter the second player's name");...
  10. Replies
    7
    Views
    1,267

    Re: Passing variable from one class to another

    What would i type though?
  11. Replies
    7
    Views
    1,267

    Re: Passing variable from one class to another

    I'm not sure i follow :S how would I pass the desired value to Tuna's constructor from my other class :S
  12. Replies
    7
    Views
    1,267

    Passing variable from one class to another

    String user1 = JOptionPane.showInputDialog("Please enter the first user's name");
    JOptionPane.showMessageDialog(null, user1 + " will go first! good luck!");


    and in my other class i have

    ...
  13. Replies
    3
    Views
    1,268

    Re: Program crashes when user input's decimals

    public static void changedue()
    {
    String textinput;
    String textinput1;
    String value1;
    int sale = 0;
    int amount = 0;
    int chnge = 0;
    int f, twenty, ten, five, one;
    double price;
  14. Replies
    3
    Views
    1,268

    Program crashes when user input's decimals

    import javax.swing.*; // import the swing library for I/O

    class change
    {
    public static void main (String[] param)
    {

    changedue();
    System.exit(0);
  15. Thread: Java Quiz help

    by kingsta
    Replies
    2
    Views
    1,946

    Java Quiz help

    Hi,

    I have to create a multiple choice quiz based bored game for an Assignment but I'm having some trouble. I've read over the internet that it would be easier to store the questions/answers in an...
Results 1 to 15 of 15