Questions tagged [swingutilities]

121 questions
0
votes
3 answers

The SwingUtilities.invokeLater() method in a Java Swing program

I am studying Java Swing and I have some questions related to this simple code tutorial that I am reading: package com.andrea.execute; import javax.swing.JFrame; import javax.swing.SwingUtilities; /* An istance of a SimpleExample class is a JFrame…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
2 answers

JFrame not staying displayed - java

I have a program that does several thing and displays different JFrames after several actions. When I launch the first JFrame from the main, it all goes ok, but When I launch it from another class different from the main class, it doesn't shows…
Igr
  • 965
  • 4
  • 13
  • 26
0
votes
1 answer

'SwingUtilities.updateComponentTreeUI(this)' removes custom Document from JComboBox

I have an editable JComboBox and JTextField. Both with custom Documents. Here is the code: import java.awt.*; import javax.swing.*; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import…
polis
  • 795
  • 7
  • 23
0
votes
1 answer

JProgressBar indeterminate thread

I have a problem while creating a JProgressBar which is set to indeterminate. The following code is my implementation of the JProgressBar and is called/constructed from another class: public class Progress implements Runnable { private JFrame…
marc3l
  • 2,525
  • 7
  • 34
  • 62
0
votes
2 answers

Determining when a process within invokeLater has completed

I am using invokeLater() to load html pages within a JEditPane which is inside a JPanel which is inside a JTabbedPane. All of my methods work fine for loading the html. The thing I am having trouble with is updating the tab title. The methods…
Alec Hewitt
  • 805
  • 1
  • 12
  • 21
0
votes
1 answer

How do I check to see if a whole component is on screen?

I'm working with a 3rd party plugin which includes a customized popup. This popup is added to a tab pane and when it appears, if to close to the JFrame border, only part of it will appear and the rest will draw off screen, as if it is behind the…
Frizinator
  • 1,351
  • 3
  • 12
  • 16
0
votes
1 answer

JAVA Swing Gui Window Hangs

I am having an issue with SWING GUI or at least I think it is the swing gui. Here is my main code file: /** * */ package com.tda.t2.ctas.slasher; import javax.swing.SwingUtilities; import com.tda.t2.ctas.slasher.gui.mainFrame; import…
Patrick Aquilone
  • 584
  • 2
  • 11
  • 28
0
votes
3 answers

Custom Modal Dialog

I am creating my own dialog which is basically a JPanel set as the glasspane on a JFrame. I want to make my dialog modal in the sense that all the code after the setVisible() is not executed while the dialog is visible and once the dialog is closed,…
bouncer
  • 173
  • 10
-1
votes
1 answer

The image Icon doesn't show up

I'm trying out the different functions of the frame and label, and the image icon doesn't show up. The code runs perfectly, but the image doesn't appear. import java.awt.Color; import java.awt.Font; import javax.swing.BorderFactory; import…
-1
votes
1 answer

DocumentListener method being called repeatedly

I've made a documentlistener that will call a method when text is inserted. It works but the problem is that it acts as if it's in a loop and is kept being called. The method uses swingutilties.invokelater from inside the method. private void…
Johnnie
  • 21
  • 4
-1
votes
1 answer

what do the swing utilities.invokelater function does?

Generally we write a code wherein we call the function swingutilities.invokelater and pass a runnable object to it. when it will invoke actually? what is the purpose of invoking it later. I would be thankful if anyone helps me with this.
siddiq rehman
  • 145
  • 1
  • 2
  • 18
-1
votes
1 answer

swing how to override a component

I didn't find good title I guess sorry for this, As you will see bottom I've called ssframe.add(new JScrollPane(table),BorderLayout.CENTER); 3 times and if I click the typeButton then unitButton it makes 2 table on the screen. I want to have one…
Vivian Maya
  • 498
  • 1
  • 4
  • 11
-1
votes
2 answers

How to keep focus on JTextField. SwingWorker

I need to keep focus on JTextField. Application uses Swing library. I need set focus on that field from time to time in order to avoid user mistakes that would change focus to other comonents. I suppose I need to use SwingWorker. Set focus is an…
user2374573
  • 59
  • 1
  • 3
  • 11
-1
votes
1 answer

how to add swing components that abide to screen resolution

How to write an swing application that abide to the screen resolution. Ex: to add an component in panel , say Label label1, I need the position of the label1 to be added in percentage . I dont want JFrame -> JScrollPane -> JComponents. This is a…
-1
votes
1 answer

How can I use SwingExplorer to navigate Applet content?

There is SwingExplorer tool from this site http://www.swingexplorer.com/ that used to navigate swing content but how do I apply it to Applet?,especially if I want to integrate it to eclipse-plugin how do I configure the running configuration? I…
user1560335
  • 79
  • 2
  • 11
1 2 3
8
9