Questions tagged [swingutilities]
121 questions
0
votes
1 answer
GUI unable to update when executing process (SwingUtilities.invokeLater)
referring to my previous question at Unable to perform any action before Process.Runtime.exec statement line, I have changed my code into two part, a thread class CmdExec that has all code to execute an external program as below:
public class…

striky
- 15
- 3
0
votes
0 answers
SwingUtilities.invokeLater does nothing
My requirement is to use addDocumentListener, the doSearchCmb basically narrows down items in combobox, function is working if keypressed is used. If I remove the function Runnable doSearchCmb and put the narrowing down of items in insertUpdate…

gengencera
- 426
- 2
- 15
0
votes
0 answers
Output data using SwingWorker
I faced with one thing. I have data from the phone to the computer and they are displayed in the JFrame window. I decided to try to do with SwingWorker, so that it loads new data, without opening new windows. Now it looks like this: the answer came…

Артем Потешкин
- 3
- 6
0
votes
1 answer
Can I put more then 1 thread in swingUtilities.invokeLater?
I don't know how to use SwingUtilities.invokeLater precisely, but in my application, the panels run in different Runnables, and swingUtilities.invokeLater accepts Runnables in the argument, but if I put a thread inside the thread of…

Forsaiken
- 324
- 3
- 12
0
votes
1 answer
Updating Swing GUI with while loop and delay
I have a while loop that is supposed to update the program data and the GUI, but the GUI part freezes until the while loop is done executing.
Here is my code:
while(game.getCompTotal() < 17) {
try {
Thread.sleep(2500);
} catch…

Caders117
- 319
- 3
- 18
0
votes
1 answer
GUI JButton Not Updating On Time
I'm working with code that is essentially a file mover program. What I'm attempting to do is after the user clicks the submit button which calls the file mover, the text of the button would change to 'Working'. I have a basic understanding of why it…

Marshal Alessi
- 105
- 2
- 2
- 11
0
votes
0 answers
Exception in JDK swing library
Getting below NullpointerException in java library. I suspected that issue is due to updating combo Box values asynchronously in background thread after user logged into application.
Note: this issue is getting in production. Any workaround or fix…

dhorrairaajj
- 39
- 4
0
votes
1 answer
modify the clipString behavior in SwingUtilities
When your text is truncated due to length in TableCellRenderer, it is abbreviated by a method called clipString in SwingUtilties2. How does one write some kind of custom clipping method? For instance, i would like to clip from the right instead…

delita
- 1,571
- 1
- 19
- 25
0
votes
1 answer
Adding swingNode to javaFx
i wrote an app with javaFx and wanna add a JButton to a Pane in SwingNode
this is my controller of fxml
public class Controller implements Initializable {
@FXML
private Pane pane;
private static final SwingNode swingNode = new…

Moolerian
- 534
- 6
- 18
0
votes
1 answer
javafx change size of swingNode
i wrote an simple app in JavaFx and wanna use swingNode in it,So i had a problem with change the size or position of my node
public class SwingFx extends Application {
@Override
public void start (Stage stage) {
final SwingNode…

Moolerian
- 534
- 6
- 18
0
votes
3 answers
How to get programmatically JOptionPane message content
My application is integrated with 3rd party standalone application which will open JOptionPane dialog boxes in separate thread and I am running the thread to close all the opened dialog boxes.So before closing I need to get the message written on…

Rohit Thakur
- 244
- 2
- 12
0
votes
2 answers
Not able to run a JLabel program
//create and display a label containing icon and a string
//JLabel and ImageIcon
import java.awt.*;
import java.applet.*;
import javax.swing.*;
import javax.swing.JLabel.*;
public class JLabelDemo extends JApplet {
public void init() {
…

Surya
- 1
- 2
0
votes
1 answer
ClassCastException thrown
I am trying to create JFrame using SwingUtilities
Thread tt = new Thread(new Runnable()
{
public void run()
{
try
{
SwingUtilities.invokeAndWait(new Runnable()
{
…

Kareem Elsayed
- 295
- 6
- 22
0
votes
2 answers
How can I make a progress complete show in a JTextArea while running code that's figuring out what to display in that JTextArea?
I don't know if this is possible. I'm making a lottery application, and I'm trying to use as few GUI components as possible. So I have a JTextArea that is supposed to show the following message (for example):
"Calculating...55.4%"
When I print it…

Peter Griffin
- 749
- 9
- 14
0
votes
2 answers
Updating the LAF of a different class
In a "Battleship" program I wrote, I included the possibility to change the "look and feel" of a program to SystemDefault, "Metal" (Java Default) or "Motif" (also included in Java). If you choose the desired LAF from a JComboBox (--> changes a…

PixelMaster
- 895
- 10
- 28