Search:

Type: Posts; User: dubs4sam

Page 1 of 2 1 2

Search: Search took 0.23 seconds.

  1. Replies
    8
    Views
    60

    Re: Array index out of bounds

    I have the Array of buttons Button1 etc

    then i have the for loop that cycles through the ButtonList and adds the to the ButtonPanel i want the Buttons from the list to be added to the button...
  2. Thread: Java GUI

    by dubs4sam
    Replies
    4
    Views
    71

    Re: Java GUI

    Using Widows 7 64 bit
    wirting code in text pad
    and compililg and running it through text pad aswell
  3. Replies
    8
    Views
    60

    Re: Array index out of bounds

    from the code that is there am i far off getting the buttons to appear randomly ie the pot of gold button and other buttons would be in diffrent places each time
    ?
  4. Replies
    8
    Views
    60

    Re: Array index out of bounds

    My program compiles butin the cmd window i see


    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 9
    at FindThePotofGold.<init>(FindThePotofGold.java:90)
    at...
  5. Replies
    8
    Views
    60

    Array index out of bounds

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import...
  6. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    Thanks forgot to delete one of the thanks for the help much appreciated
  7. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import...
  8. Thread: Java GUI

    by dubs4sam
    Replies
    4
    Views
    71

    Java GUI

    When running a Java GUI is it possible to stop black system window from opening as we'll

    Thanks
  9. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    i just cant get my head around it
    thanks anyways ill try it again later
  10. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    2) assign it the value from getSource() (requires a cast)
  11. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    im not 100% sure how to do that
  12. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    if(e.getSource().equals(Button1.getButton1()){
    Button1.setIcon(new ImageIcon("leprechaun.jpg"));
    }


    Somthing like that that gives me an error aswell am i on the right track though ?
  13. Replies
    15
    Views
    104

    Re: change Jbutton icon when clicked

    C:\Users\Andrew\Desktop\GUI programing\Assignment Pot of Gold\FindThePotofGold.java:113: error: cannot find symbol
    Button1.setIcon(new ImageIcon("leprechaun.jpg"));
    ^
    symbol: variable...
  14. Replies
    15
    Views
    104

    change Jbutton icon when clicked

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import...
  15. Replies
    13
    Views
    156

    Re: GUI JCombo BOx with updating Jlabel

    Got it thanks very much for you help appreciate it
  16. Replies
    13
    Views
    156

    Re: GUI JCombo BOx with updating Jlabel

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import...
  17. Replies
    13
    Views
    156

    Re: GUI JCombo BOx with updating Jlabel

    That throws up a diffrent error




    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
  18. Replies
    13
    Views
    156

    Re: GUI JCombo BOx with updating Jlabel

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import...
  19. Replies
    13
    Views
    156

    Re: GUI JCombo BOx with updating Jlabel

    thats what im having the issue with i dont know how to do that i was trying to use somthing like



    selection.setText(choiceOptionList.getText());




    but i do t think this will work
  20. Replies
    13
    Views
    156

    Re: GUI JCombo BOx with updating Jlabel

    I would have to refrence the array and add an event handler not rellay sure how to do it though
  21. Replies
    13
    Views
    156

    GUI JCombo BOx with updating Jlabel

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import...
  22. Replies
    32
    Views
    52

    Re: Find Highest rated movie

    thanks for your help
  23. Replies
    32
    Views
    52

    Re: Find Highest rated movie

    I have it printing out the highest rated film now not sue if its the correct way but its doing waht i want it to do thanks for the help

    //******************QUESTION**********************\\
    ...
  24. Replies
    32
    Views
    52

    Re: Find Highest rated movie

    it holds the value of the rating
  25. Replies
    32
    Views
    52

    Re: Find Highest rated movie

    s is the variable rating
    i dont know how else to format the code
Results 1 to 25 of 47
Page 1 of 2 1 2