Search:

Type: Posts; User: coley909

Search: Search took 0.09 seconds.

  1. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    I still haven't gotten the toggling between the two methods to work this is turning my hair grey
  2. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    this is where I am at now buttons working they call the methods and repaint. How do I setup button 3 to flip back and forth between my img file and my drawpicture method



    import javax.swing.*;...
  3. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    Sorry thats what I meant.
  4. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    Yes it had to do with JApplets
  5. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    I run my programs in eclipse and they run in java applets
  6. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    Can't we never learned JPanels, not sure what the teacher would think of that....
  7. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    where should my buttons go then?

    Also it does not work when I remove the code for my button locations. It still displays the methods all the time, also when I change the background I can no...
  8. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    does this make more sense? int A = 0 unless button 4 is pushed turning A into a 1 allowing the if statement to run


    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import...
  9. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    When I click button 4 it should print my method for drawpicture and drawImage but instead it just prints both methods all the time instead of only when the button is clicked.


    1559
  10. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    It doesn't do what I want it just constantly prints the methods now no matter what. The purpose of that code was because I wasn't sure what to put in there I was testing and playing to see if I...
  11. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    like this I am only working with button 4 by the way?


    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;

    //Cole Williams
    //Making smiles and...
  12. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    right, so my action listener should have a value in it of some kind that tells paint what to print. When the action listener proves true it should print my picture when false it should do nothing,...
  13. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    ok I am getting it, so something like if button 1 is pressed then do A and A corresponds with something in paint. like paint A which = the method. right?

    it can't print in the actionperformed but...
  14. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    what I mean by not finding them is as follows. When the code called by the button is contained inside the actionperformed it runs perfectly fine . Thats why button 1 works properly. If I call...
  15. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    It does work I called the image under init without buttons it pulled in just fine. I ran text.setText("test"); under each button they all printer test to my text box. My buttons are not calling my...
  16. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    It should be the right path, it doesn't print anything.
  17. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    modified the code fixed mistakes, still not sure why its not pulling my drawnimage in :)
  18. Replies
    1
    Views
    936

    Re: Remote shutdown help needed!

    Wouldn't a script be more suitable?
  19. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;

    //Cole Williams
    //Making smiles and colors with buttons

    public class williamsclab10 extends...
  20. Replies
    37
    Views
    2,897

    Re: buttons that call methods

    Will do on the highlight tags, are you saying I should have a,b,c,d for the actionperformed?

    --- Update ---

    OMG I see it now up top

    --- Update ---

    Corrected copy and paste issue, I was...
  21. Replies
    37
    Views
    2,897

    buttons that call methods

    Hey guys been lurking for awhile, I am at wits end on this. I have been learning java for the past couple months been doing usual stuff like methods, loops, if and thens that kind of stuff. Well I...
Results 1 to 21 of 21