Search:

Type: Posts; User: KevinWorkman

Page 1 of 20 1 2 3 4

Search: Search took 0.44 seconds.

  1. Re: Algorithm for calculating lines for paragraph

    Can't you use the FontMetrics class?
  2. Re: Looking for a resizable generic Table class

    I don't disagree, only because Swing's source code is pretty old- using Vectors instead of ArrayLists, for example.

    My only point was to show that there isn't a standard existent data structure,...
  3. Re: Looking for a resizable generic Table class

    I doubt you're going to find exactly what you're looking for. You're probably best off just rolling your own, either using a 2D array or an ArrayList of ArrayLists.

    For example, Swing's...
  4. Re: Looking for a resizable generic Table class

    What exactly do you mean by table?

    Do you mean a GUI component? If so, you're probably looking for Swing's JTable or JavaFX's TableView.

    Or do you mean some kind of data structure? If so, an...
  5. Re: Is the java.lang package automatically present?

    What do you think the answer is? What happened when you wrote a little test program?
  6. Replies
    2
    Views
    379

    Re: Java 2d game development

    Cornix pretty much nailed it, but let me offer my two cents.

    If you're just starting out (even if you're not), I highly recommend checking out Processing. Processing is built on top of Java, so...
  7. Re: Can you use images as buttons in Processing

    You might consider using a grid instead- maybe a 2D array? That way you don't need to worry about positioning as much. That's what I would do if I were you, anyway.
  8. Re: Can you use images as buttons in Processing

    Well, again, you'll have to break it down into smaller pieces: can you detect when all of the pieces are in the correct place? Can you write a separate sketch that shows a congratulations message?...
  9. Re: Can you use images as buttons in Processing

    Well, in addition to just calling setup() again, you need to stop any existing music and reset any variables.

    One approach is to have a separate stop() and reset() function. Call those instead of...
  10. Re: Can you use images as buttons in Processing

    Okay, cool. You've got a program that detects when the mouse is inside the rectangle- that's exactly what you'd do with an image.

    There are a couple different ways to detect a mouse click. You can...
  11. Re: Can you use images as buttons in Processing

    Processing isn't exactly Java. It's a great way to start, but things like images and buttons are handled very differently in Processing versus Java.

    But your instincts are correct: you can detect...
  12. Re: Checking parantheses using stack data structure

    I'm not really sure what your question is. What does this code do? What isn't working about it? Can you fix your formatting and post an MCVE?

    What are you trying to do here:

    str.indexOf(i)=='('...
  13. Re: Can you use images as buttons in Processing

    Are you asking about Processing or Java?

    Either way, the answer is yes. What have you tried?
  14. Replies
    3
    Views
    182

    Re: Calculator Layout

    For starters: make sure you add your components to your JFrame **before** the JFrame is visible. Otherwise you have to revalidate your JFrame to redo the layout.
  15. Replies
    1
    Views
    1,277

    Re: Parsing string from pattern

    What you're talking about is called capture groups. Google is your friend, but feel free to post some code if you get stuck.
  16. Replies
    3
    Views
    182

    Re: Calculator Layout

    You've got two JFrames here: the one you're extending, and the one you're creating and showing.

    You add your menu bar to the JFrame you're extending, but then you show a different JFrame.

    I'd...
  17. Replies
    1
    Views
    164

    Re: Need help with a Comp Sci Lab

    What exactly are you confused about? What's the absolute smallest, simplest thing you know you need to do next?
  18. Replies
    20
    Views
    280

    Re: Inheritance & Polymorphism

    http://www.java-forums.org/new-java/94610-inheritance-polymorphism.html
  19. Re: When I am deleting data from a file, the temp file won't rename back to original file

    The code is not doing what you expect it to do. That is the exact reason for debugging. In fact, you're just asking us to do your debugging for you- which we really can't do, since we don't have...
  20. Re: When I am deleting data from a file, the temp file won't rename back to original file

    Do you get an Exception of any kind? Try debugging your code by either stepping through with a debugger, or at least adding print statements, to figure out when the program's execution differs from...
  21. Replies
    1
    Views
    101

    Re: Transparent Panel Drawing

    You've asked a bunch of questions- take them one at a time. Can you post an MCVE- preferably without any of the Netbeans GUI builder code, since it's a nightmare.
  22. Replies
    2
    Views
    337

    Re: exam question

    I'm not sure what your question is- it's hard to go off of "stuck". What exactly are you confused about?
  23. Replies
    1
    Views
    104

    Re: ActionListener don't work

    Why would it? The KeyPressed() function should be the keyPressed() function, but you don't have a KeyListener anywhere so it doesn't really matter.

    Please post an MCVE, and we'll go from there.
  24. Thread: Sudoku

    by KevinWorkman
    Replies
    4
    Views
    201

    Re: Sudoku

    http://www.java-forums.org/new-java/94628-sudoku.html
  25. Re: How to display a decimal place with 100 digits?

    Well, you're getting into the whole problem with floating-point numbers. Computers don't have infinite precision, so there's a limit to how many decimal places you'll get when dealing with them.
    ...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4