Thread safe « Thread « Java Swing Q&A





1. Java: Swing Libraries & Thread Safety    stackoverflow.com

I've often heard criticism of the lack of thread safety in the Swing libraries.
Yet, I am not sure as to what I would be doing in my own code with ...

2. Is Component.getGraphicsConfiguration thread safe?    stackoverflow.com

There are many methods you shouldn't call if you are not on the AWT event thread. These are generally methods that manipulate the UI in some way. Is this the case ...

3. Java: testing thread access to "not thread-safe" methods    stackoverflow.com

My strategy for threading issues in a Swing Java app is to divide methods in three types:

  1. methods that should be accessed by the GUI thread. These methods should never block ...

4. Which Swing component methods are thread safe?    stackoverflow.com

According to Swing tutorial:

Some Swing component methods are labelled "thread safe" in the API specification; these can be safely invoked from any thread. All other Swing component ...

5. Java GUI and threads    stackoverflow.com

I have a GUI which has textarea and buttons and etc......... I have a different class which is a thread that is running constantly. I want to append text to the textarea ...

6. Thread-safe problem of the java GUI creation    stackoverflow.com

In the following sample code,

/*
 * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with ...

7. Is this GUI threadsafe (Using Swing)?    stackoverflow.com

I have the following code in my constructor for my GUI

    search.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
  ...

8. Best practice when using threads in SWING / Java in general    stackoverflow.com

I have a SWING UI that contains a button that creates a new SwingWorker thread. That thread then queries the SQLite database for results to put them in a JTable. In ...

9. Racing scenario regarding to multithreading programming    stackoverflow.com

I'm designing a net game so I have a client with one listening thread to things that are coming from server, also the server has a listening thread which is listening ...





10. Image creation in Java with Component.createImage(ImageProducer) and custom ImageProducer    stackoverflow.com

I'm working on a Java fractal program. In my design, I would like to implement a particular ImageProducer class which computes pixels in a background worker thread when the startProduction(ImageConsumer) gets ...

11. Are swing components thread safe?    coderanch.com

13. Thread Safe Problem    coderanch.com

Hello All I do have a doubt for Thread Safety in my application I am describing my scenerio as follows : In my application WVSEntry as an Object that used as a javabean which is a dataobject for table row.now in my application consider two operation occurs at time where i need to update that data object(WVSEntry) My question are as ...

14. App does not work when on thread-safe in JBuilder    coderanch.com

BTW - here is the example app from Sun's tutorial you mentioned. import java.awt.*; import java.awt.event.*; import javax.swing.*; /* FrameDemo.java requires no other files. */ public class FrameDemo { /** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread. */ private static void createAndShowGUI() { //Suggest that the L&F ...

15. Thread-Safe issues    coderanch.com

I know most Swing components are not thread-safe, but does this mean I shouldn't even call getHeight() or isVisible() from anything but the Event Dispatch Thread (i.e. methods that do not modify the component)? The JavaDocs state (not quoted verbatim) that methods and components that are thread-safe are specifically stated as so, but get and is methods never mention either way. ...

16. what is a safe thread?    coderanch.com

hey have been reading over a few posts and thread saftey has poped up a lot.... what is a safe thread?? i have a multi-threaded app that i have been working on and would like to know if it is inherantaly safe or not... on EDT i can start different threads depending on what i want to run so i gond ...





17. Swing clock - thread safety?    forums.oracle.com

/* * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved. * * Permission to use, copy, modify, and distribute this software * and its documentation for NON-COMMERCIAL purposes and without * fee is hereby granted provided that this copyright notice * appears in all copies. Please refer to the file "copyright.html" * for further important copyright and licensing information. ...

18. Swing isn't thread safe, what about AWT?    forums.oracle.com

You say that is if being gay were a bad thing. So, besides being an obnoxious fuckhead, you're also a homophobic troglodyte? Man your fiancee must be a real winner to have picked you. My guess is that she's either a sheep, a blow-up doll, or someone you've got bound and gagged in your basement.