Search:

Type: Posts; User: Leonardo1143

Page 1 of 2 1 2

Search: Search took 0.24 seconds.

  1. Replies
    3
    Views
    167

    Re: No images being displayed

    Would I be able to set it to "Desktop/GreatWall.JPG". Would that work if the image is there?
  2. Replies
    3
    Views
    167

    No images being displayed

    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.ButtonGroup;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;...
  3. Re: Help me I am trying to get this code to work.

    How would I do the latter? just put in (double r)?
  4. Help me I am trying to get this code to work.

    Here is what my compiler is telling me: GeometryCalculator.java:20: error: constructor Sphere in class Sphere cannot be applied to given types;
    Sphere sp = new Sphere(r);
    ^...
  5. Replies
    4
    Views
    439

    Re: Error:Cannot find Symbol

    Nvm fixed that one too

    --- Update ---

    Alright my code compiled without a problem. Thank you guys

    --- Update ---
  6. Replies
    4
    Views
    439

    Error:Cannot find Symbol

    I'm having some trouble. Right now it's just that the compilier is telling me it cannot find the symbol



    Grades.java:10: error: cannot find symbol
    ArrayList<Integer> Grades = new...
  7. Replies
    4
    Views
    236

    Re: boolean problem.

    Sorry I was doing this on a website. It messed up when I moved it here. But I fixed the problem.
  8. Replies
    4
    Views
    236

    boolean problem.

    public boolean sum28(int[] nums) {
    int [] sum28 = {10,2,2,2,2,50};

    int sum;

    for (int i=0; i<sum28.length; i++) //This will cycle through the elements
    {
    if (sum28[i] == 2) //If...
  9. Re: Need to draw something with lines and loops

    Oh sorry for ambigious in my first post. But What I was wondering is how to loop it, effectively, and what are the coordinates. For example (x,x,x,x). What do each of those x's represent when i want...
  10. Need to draw something with lines and loops

    import javax.swing.*;
    import java.awt.Graphics;
    import java.awt.Color;

    public class MyDrawing_Start extends JFrame {
    public MyDrawing_Start() {
    add (new MyPanel());
    }

    public static...
  11. Re: Need to input algorithems with String values.

    Okay, now i am bit confused. So I may just go the longer route and just individually label the parts I need for my algorithm to work (armor,combat level,etc). Thanks for trying though.
  12. Re: Need to input algorithems with String values.

    Oh okay so using 10 for my example should fix it?
  13. Re: Need to input algorithems with String values.

    I chose 27 because it was used in the example
  14. Re: Need to input algorithems with String values.

    That was the whole error message and No I don't know what the radix was I was basing it off the API's example.
  15. Re: Need to input algorithems with String values.

    I thought the second arg,27, was for radix? The API used that as an example.
    "Exception in thread "main" java.lang.Error: Unresolved compilation problem:

    at...
  16. Re: Need to input algorithems with String values.

    Armor = parseInt("Armor", 27)


    like that?
  17. Re: Need to input algorithems with String values.

    So how would I go about assigning the string value of armor to an int? Like I said


    parseInt("Kona", 27) returns 411787

    returns a value but when I try


    parseInt("Armor", 27)
  18. Re: Need to input algorithems with String values.

    Okay I read it and don't completely understand it. If I have a string value, like armor, Do i put it in like this?


    Integer.parseInt(Armor);
    ...
  19. Re: Need to input algorithems with String values.

    Where would I find the API document?
  20. Re: Need to input algorithems with String values.

    Sorry it seems I was supposed to use "Integer.parseInt()". But how would I go about changing something like armor, a string, to 25, an int value, using this?
  21. Re: Need to input algorithems with String values.

    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    The method parseInt(JTextField) is undefined for the type new ActionListener(){}

    at...
  22. Need to input algorithems with String values.

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

    public class SimpleWindow extends JFrame {

    JLabel...
  23. Replies
    17
    Views
    266

    Re: Need help on my code

    Thank You, Norm. I got it to work thank you for being so patient with me.
  24. Replies
    17
    Views
    266

    Re: Need help on my code

    Oh. I think I'm getting it. Remove setText(). from the method and move into the action listener only?
  25. Replies
    17
    Views
    266

    Re: Need help on my code

    Okay which line of code is calling the setText()? I can't see it? Because I thought I needed to place getText in order for the setText to be called. I'm guessing this is wrong?
Results 1 to 25 of 31
Page 1 of 2 1 2