Skip to main content

All Questions

Tagged with
0 votes
1 answer
66 views

java- how to multiple(indefinite) asynchronous callbacks. is there a desing pattern or somehing?

I am not sure if I asked right in title but here is the problem. I have a class that does a jop asyncronously and also has to run on Swing UI thread. like this SwingUtilities.invokeLater(() -> { ...
lazyCoding's user avatar
3 votes
0 answers
993 views

Java - Wait for component to be shown

UPDATE #3: After madProgrammer's suggestions, maybe the timed solution is the best. But no answer has been given to this strange behaviour. I understand the fact that components are not shown ...
Francesco Rizzi's user avatar
0 votes
1 answer
211 views

Java call back in swing html

We are using HTML to draw a table in our swing application String html = generateHtml(); this.textPane = new JTextPane(); HTMLEditorKit kit = new HTMLEditorKit(); textPane.setEditorKit(kit); ...
urir's user avatar
  • 1,995
0 votes
2 answers
310 views

Java Swing exception when notifying from an event callback

So I have a GUI which acts kind of like a console. I want the user to enter text into a JTextField and press enter. I've used key bindings to make a callback for when the user presses enter. Now I ...
PartyBuddha's user avatar
0 votes
3 answers
133 views

Making the "Calling method" wait for the "Return" of data

I have 2 classes, one class is a JFrame (MainUIHolder.java) and the other class is a JDialog (EditValuationsDialog.java). MainUIHolder can call EditValuationsDialog on button click event. Once ...
PeakGen's user avatar
  • 22.7k
0 votes
0 answers
240 views

In Java, how to run a sequence of JFrame extensions so that closing one makes the next open?

Given an array of "modules" which are instances of various different JPanel extensions, how can I "run" each of them in sequence, so that the (i+1)st one opens when the ith one closes? I'm creating a ...
baixiwei's user avatar
  • 1,029
-2 votes
3 answers
1k views

Callbacks and listeners ; MouseListener

I'm trying to write a project with listeners, I've got my buttons working where they change the color, now i need my mouseLIsteners to print text of what the mouse is doing. for example:"Mouse has ...
Thomas Norman's user avatar
0 votes
0 answers
114 views

Pattern for nested callbacks

In this Swing example, I have two separate classes for the JFrame and the JMenuBar (Frame.class and MenuBar.class) and the Main.class, where I do the work. I'm using a callback to inform the Main....
not_a_number's user avatar
1 vote
0 answers
464 views

JNA Java - Callback only work when there is no Jframe

I've programmed a DLL in C. The first function sends a pointer of the callback function that is called when new data is available. So I use JNA to wrap this function. In order to avoid the end of ...
user979128's user avatar
1 vote
0 answers
233 views

Java Process Threading issue

My problem involves Process and Runtime, and attempting to run this while allowing a main Java Swing GUI to update a status bar, so here goes: I've been working on an internal development tool for my ...
ThomSirveaux's user avatar
4 votes
3 answers
2k views

java SwingWorker launching runnables from doInBackground() and howto notify event dispatch thread

just learnd the SwingWorker and have a question ( i have search for a answer to this but non specifically address this setup) Im creating a small server that will have like max simultaneous 2-3 ...
Erik's user avatar
  • 5,089
0 votes
1 answer
626 views

SerializationProblem (?) of custom AsyncCallback

I implemented an own Marshalling/Unmarshalling Sytem with JMS (exercise). I do Request and get Responses back. I want to fire an own callback in response after i received the correct response. But i ...
ludwigm's user avatar
  • 3,383
1 vote
2 answers
185 views

Swing: programatically modifying the UI without triggering callbacks

If it is taken for granted that you need to modify programatically an element of the UI, like, say, a JComboBox's selected item without triggering any modification/notification event, then how to do ...
SyntaxT3rr0r's user avatar
  • 28.1k