Search:

Type: Posts; User: AlexHail

Page 1 of 2 1 2

Search: Search took 0.18 seconds.

  1. Replies
    8
    Views
    1,210

    Re: cant rotate image to mouse position

    You have your angle down and I see you are using the AffineTransformation but this code is far too large and unclean to read. If you can identify parts of code you have singled out errors in, then we...
  2. Re: Having difficult to move("focus") one sprite frame to another. Please help.

    You said you've attempted to convert the VB.NET code to Java so lets see some evidence. Show us work, ask specific questions. Where are you stuck? What is confusing you? Be intuitive in your work and...
  3. Replies
    17
    Views
    3,026

    Re: is something wrong with my code? Lab 10.1

    That is true. I suggested a syntactically correct algorithm. From this, his personal development can progress and branch out to discover your statement on their own. If his question had been "How can...
  4. Replies
    17
    Views
    3,026

    Re: is something wrong with my code? Lab 10.1

    If the question was print a string ranged from 1-1,000,000 then my advice would be deemed bad because there are more efficient ways of achieving this. But it wasn't, it was 1 to 50. Considering there...
  5. Replies
    17
    Views
    3,026

    Re: is something wrong with my code? Lab 10.1

    How about being constructive instead of self satisfying posts.
  6. Replies
    17
    Views
    3,026

    Re: is something wrong with my code? Lab 10.1

    You have several logic problems in your quest to finish your code so I will suggest a route to take... Follow at your own will and post back for questions


    Create an array of size 50 (indexes...
  7. Re: Need help with nesting if statements! (Scrub) EDITED

    From the looks of it you were very close.

    There are multiple ways you could go at this:


    Your way, test the individual chars of the string literal for certain situations

    or
  8. Thread: ParseDouble.

    by AlexHail
    Replies
    2
    Views
    1,235

    Re: ParseDouble.

    To parse a double from the user you can use the Scanner class' nextDouble() method. You can use it to directly initialize a variable as you declare it. This scanner class can be used to read all...
  9. Replies
    4
    Views
    1,495

    Re: another school homework thread

    You are using a rough format to break down and understand, might I suggest using brackets "{" & "}" to body your for loops, if-then statements, and while loops.

    As of right now your while loop...
  10. Replies
    7
    Views
    1,248

    Re: Passing variable from one class to another

    public Tuna(String yourStringVariableHere){ //unnecessary identifier but just to make it obvious..
    q1 = new JLabel(yourStringVariableHere);
    }

    Passing the string variable passed to your...
  11. Replies
    4
    Views
    1,205

    Re: logical errors

    What seems to be the problem here? Post error messages, questions, expected output and the output you have now... etc etc
  12. Replies
    2
    Views
    1,399

    Re: Txt file to array

    Here this sample code should get you where you need to be... :cool:



    public class TextToFileArray {

    public static void main(String[] args){

    }
    }
  13. Re: ERROR : "CLASS NAME IS ABSTRACT CANNOT BE INSTATIATED"

    If you won't read his tutorials I'll sum it up.

    You can't instantiate an abstract class because of that precisely.. it is abstract.
    Therefore you can't run your class at all because its intent is...
  14. Re: What Exactly Object Oriented Programming is ??

    Building off of this..

    Object oriented simply means this generic type of programming style is preferred for this language. Obviously no one is gonna stand behind you and make you write an...
  15. Replies
    4
    Views
    899

    Re: I get an error

    I would check out some basic tutorials on how to declare variables, and which types hold what kind of values.

    Declaring Member Variables (The Java™ Tutorials > Learning the Java Language >...
  16. Replies
    2
    Views
    1,057

    Re: Array out of bounds

    /facepalm. Well that part is solved. But it only fills a quarter block my screen with pink, and I need it to fill the entire applet :< Thanks though

    -----UPDATE-----

    Fixed that too. Thanks
  17. Replies
    2
    Views
    1,057

    [solved] Array out of bounds

    Hello again. I am working with canvas and attempting to fill the screen with an area of pixels, of which I can color through layered for loops seen below. My problem is that when targeting the pixels...
  18. Replies
    5
    Views
    2,676

    Re: how to display a bar chart using loops

    Unless your teacher/instructor specifically says "Don't declare 5 variables in a row and use them", then I see nothing wrong with using 5 separate values and assigning them when the user is giving...
  19. [SOLVED] Re: Return an array of Pairs that have the same length as the input array of Strings.

    What....? Please don't listen to Martin. There is no reason to make an object for your task is much simpler than that.

    Hemla if you are not looking to find a value, but rather do a certain...
  20. [SOLVED] Re: Return an array of Pairs that have the same length as the input array of Strings.

    Hi. Well first lets take a look at what you're doing here... No matter what your method is going to return null because that's what you've told it to do. You basically just said to return this method...
  21. Replies
    5
    Views
    1,821

    Re: Drawing in a JPanel

    With no code I don't really know where to advise you, either post progress or take a look at this.

    THIS
  22. Replies
    10
    Views
    1,259

    Re: The endless Null torcher...

    Ahhhhhh I see now. This will take some reworking for sure but my app does need to be running on the EDT. Thanks for the help
  23. Replies
    10
    Views
    1,259

    Re: The endless Null torcher...

    Thank you for your input. I'll be looking around at the swing class in the API and seeing what I can find... It is very vague but ANY help is much appreciated
  24. Replies
    10
    Views
    1,259

    Re: The endless Null torcher...

    There is, it is all references to EventQue and component handling classes within the API. Google java NPE repaint 249 and I'm sure you could find the exact same stack trace.
  25. Replies
    10
    Views
    1,259

    Re: The endless Null torcher...

    That's really weird I'm not sure how those copied over, but I removed them before I posted this code. It doesn't contain them and the error is still there.
Results 1 to 25 of 49
Page 1 of 2 1 2