Search:

Type: Posts; User: evert67

Page 1 of 2 1 2

Search: Search took 0.34 seconds.

  1. [SOLVED] Re: Is there a method that allows the user to enter a single character only?

    I implemented the spinner. It works beautifully. Thanks!
  2. [SOLVED] Re: Is there a method that allows the user to enter a single character only?

    Thanks a lot! I'll start with this tomorrow.
  3. [SOLVED] Re: Is there a method that allows the user to enter a single character only?

    Thanks! Have you got a reference for me to a good explanation of JSpinner? I know the Oracle site, but if there is a more tutorial-like explanation, that'd be nice. (I'm just a beginner teaching...
  4. [SOLVED] Is there a method that allows the user to enter a single character only?

    I'm writing a program to solve sudoku programs. Users should be able to enter their input. This is a character from 1-9. (Or a space to clear a box.)

    I'm now using a JOptionPane.showInputDialog to...
  5. Re: Is there a way to specify where on screen a JFrame or a JDialog should appear?

    Well, I discovered the reason...

    One can easily center a JFrame such that its center coincides with the center of the component c that creates it. Simply use the statement...
  6. Re: Is there a way to specify where on screen a JFrame or a JDialog should appear?

    Thanks. That was useful advice. It was a bit of searching between all the different methods of JFrame and its friends, but I found it.

    The location of a JOptionpane (which I use quite a lot) can...
  7. What is a good book to learn Android programming?

    I've managed to teach myself Java and I'm now moving on to Android development. I taught myself Java using a book (Sams Java in 21 days) and I like this a lot better than using online material only....
  8. Is there a way to specify where on screen a JFrame or a JDialog should appear?

    The title says it all.

    I've got a program that uses a few JFrames and JDialogs. The main window is a JFrame and always appears in the top left corner of the screen. The same applies to all other...
  9. Re: SwingWorker implemented - how to do additional GUI processing?

    Ah, that's it! The done method works. I also just found it in the Oracle docs :-).

    Thanks!

    Just don't always believe Teach yourself Java in 21 days (a pretty decent book otherwise).
  10. Re: SwingWorker implemented - how to do additional GUI processing?

    I fire off the GUI as follows:



    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    ViewController_Graphics view = new...
  11. Re: SwingWorker implemented - how to do additional GUI processing?

    OK, I understand that classes or objects don't run on threads. I didn't express myself carefully enough. I'm teaching myself Java with two books: Teach yourself Java in 21 days (Cadenhead) and...
  12. Re: SwingWorker implemented - how to do additional GUI processing?

    Thanks. But I don't understand this.

    1) I'd like the user to be able to press a Cancel button before the worker threat has finished. The property change listener is only called after the worker...
  13. SwingWorker implemented - how to do additional GUI processing?

    In a previous question I asked how I could implement processor-intensive work, which was called by a Swing component, without the GUI locking up. I was then pointed to the SwingWorker class. I...
  14. Re: How to "split off" processor-intensive calculations in Swing ActionListener?

    Thanks. I'll read more about SwingWorker.

    Just to be sure. My UI code (class ViewController_Graphics) is invoked as follows:



    SwingUtilities.invokeLater(new Runnable() {
    ...
  15. How to "split off" processor-intensive calculations in Swing ActionListener?

    I am writing a program to solve Sudoku puzzles. My user interface is written in Swing.

    When a user presses a "Solve" button, an ActionListener for this button is called. This ActionListener...
  16. Re: How does repaint work in combination with paintComponent (Graphics class)?

    I already messed with the code. What I found out is that the code actually works as if the first repaint removes the red box: if you remove that line, the red box remains displayed also at its old...
  17. Re: Why should Swing GUI code be placed on the EDT?

    Do I also need to use the above code (explicitly put the Swing code on the EDT) if my entire program runs in one threat, i.e. my program never explicitly creates any threats?
  18. Re: How does repaint work in combination with paintComponent (Graphics class)?

    Thanks, this clarifies it a bit. But what I still don't understand is how the first invocation of repaint causes the red box to be wiped out.
  19. Re: Why should Swing GUI code be placed on the EDT?

    As I wrote in the other topic: are these forums somehow connected and, if so, is there a preferred place?
  20. Re: How does repaint work in combination with paintComponent (Graphics class)?

    Yup. Are these forums somehow connected and, if so, is there a preferred place?
  21. Why should Swing GUI code be placed on the EDT?

    According to what I read, ďwhen programming in Swing, your GUI creation code should be placed on the Event Dispatch Thread (EDT). This will prevent potential race conditions that could lead to...
  22. How does repaint work in combination with paintComponent (Graphics class)?

    Iím teaching myself AWT/Swing using an Oracle tutorial. Thereís a section a donít fully understand.

    It concerns an application that creates dynamic graphics using the Graphics class. I understand...
  23. Re: How to set (minimum) panel size for panel with a Graphics2D object only?

    Yes, I read that later. Which is the preferred method, override getPreferredSize() or use setMinimumSize() ?
  24. Re: How to set (minimum) panel size for panel with a Graphics2D object only?

    Thanks a lot! It works!
  25. How to set (minimum) panel size for panel with a Graphics2D object only?

    I am writing a program to solve Sudoku puzzles. I create the user interface using AWT/Swing.

    One panel of the main window (JFrame object) contains a Graphics2D component only (a grid for the...
Results 1 to 25 of 29
Page 1 of 2 1 2