Event dispatching to ScrollPane placed under overlay pane

Hi all,
I have layered pane structure like this:
StackPane wStack = new StackPane();
ScrollPane scroll = new ScrollPane();
Region overlay = new Region();
wStack.getChildren().addAll(scroll, overlay);And need to handle mouse events by elements on overlay and then by scroll,
when I put overlay over scroll it handle all mouse events,
overriding of buildEventDispatchChain in overlay helps to propagate events to scroll
    public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
        scroll.buildEventDispatchChain(tail);
        return super.buildEventDispatchChain(tail);
    }I see it by handling scroll.setOnMouseClick() and it work,
but scroll control itself still does not work (not react on mouse)

Thanks,
My example is a bit contrived because I tried to produce the minimal example that would show the problem. In reality I have other components on my JPanel as well as the text component and I want them all to be under the scroll bar, so I can't simply add the scroll pane to the text component, I have to use a panel.
I also think that this problem has something to do with the fact that styled text components are "scrolling savvy" (they implement Scrollable) whereas JPanel is not. So I implemented a subclass of JPanel that implements Scrollable, but so far I haven't got the text to wrap. I tried delegating all of Scrollable's methods to the text component that the panel contains but that didn't work, and I tried implementing Scrollable's methods myself and returning true for getScrollableTracksViewportWidth() but that didn't work, still no wrapping.
It seems like this is the right direction though. I'll continue to investigate when I have time.

Similar Messages

  • I need to make a task with less as3 code and more timeline structure and event dispatcher !

    I went to an interview in a big company. I had to make a  task in which there is a wall with 3 lines and 5 columns filled with bombs.When you click on a bomb the bomb changes its scale, a robot enters, goes under the bomb and takes it, then goes to a smaller wall, makes the bomb smaller and place it at the same place it had been in the previous wall.I made the task with tween througout as3 code.The interviewer told me it was good but i need to make it with the less code possible and with more complex timeline structure and to use event dispatcher.What is the best way to do this ?

    The immediate thing that comes to mind is they might want to see that you can balance work between design teams and development teams.
    To do that, the robots movements (pick up bomb, bomb grows/shrinks, arms/treads/legs moving, sequences of 'doing things') can be timeline based so animators can work on those separate from code.
    Developers would be working on the logic of keeping score, moving the robot around to the correct spot with path detection, collision detection, etc.
    It's very similar to thinking in simple factories (which Flash is good at being automatically with timelines), and a bit of MVC (or just VC in some cases).
    Big companies have lots of different types of employees so you'll probably be very specific in your role so you're efficient.

  • Exception occurred during event dispatching:java.lang.NoSuchMethodError

    Hello,
    We have upgraded to the latest Oracle Application Server version 10.1.2.3.0 and the webutil version is 1.0.6.
    But we face the following error while accessing the web link. Following message captured from Java Console.
    Please suggest if you have any solutions/idea about this error. Thanks !
    Oracle JInitiator: Version 1.3.1.22
    Using JRE version 1.3.1.22-internal Java HotSpot(TM) Client VM
    Maximum size: 50 MB
    Compression level: 0----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Downloading http://si02938.in.irt.com:7778/forms/java/frmall_jinit.jar to JAR cacheDownloading http://si02938.in.irt.com:7778/forms/java/frmwebutil.jar to JAR cacheDownloading http://si02938.in.irt.com:7778/forms/java/jacob.jar to JAR cacheDownloading http://si02938.in.irt.com:7778/forms/java/FileInformation.jar to JAR cacheDownloading cacheproxyHost=nullproxyPort=0connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.3
    Exception occurred during event dispatching:java.lang.NoSuchMethodError     at oracle.forms.webutil.common.VBeanCommon.init(VBeanCommon.java:281)     at oracle.forms.handler.UICommon.instantiate(Unknown Source)     at oracle.forms.handler.UICommon.onCreate(Unknown Source)     at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)     at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)     at oracle.forms.engine.Runform.processMessage(Unknown Source)     at oracle.forms.engine.Runform.processSet(Unknown Source)     at oracle.forms.engine.Runform.onMessageReal(Unknown Source)     at oracle.forms.engine.Runform.onMessage(Unknown Source)     at oracle.forms.engine.Runform.processEventEnd(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)     at java.awt.Component.dispatchEventImpl(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.EventQueue.dispatchEvent(Unknown Source)     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.run(Unknown Source)
    Edited by: user12233243 on Nov 16, 2009 10:28 PM
    Edited by: user12233243 on Nov 16, 2009 10:29 PM

    hi
    read the following configuration i hope it will help u.
    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    [OraHome] with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
    and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
    [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
    cd [JacobStage]
    copy jacob.jar [OraHome]\forms\java\.
    copy jacob.dll [OraHome]\forms\webutil\.
    The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
    Open a DOS command prompt.
    Add [OraHome]\jdk\bin to the PATH:
    set PATH=[OraHome]\jdk\bin;%PATH%
    Sign the files, and check the output for success:
    [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
    [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
    you may skip this step. Otherwise,
    Create a schema to hold the WebUtil stored code, and privileges needed to
    connect and create a stored package. Schema name "WEBUTIL" is recommended
    for no reason other than consistency over the user base.
    Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
    out the EXIT statement, to be able to see whether the objects were created witout
    errors.
    Start SQL*Plus as SYSTEM, and issue:
    CREATE USER webutil IDENTIFIED BY [password]
    DEFAULT TABLESPACE users
    TEMPORARY TABLESPACE temp;
    GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
    CONNECT webutil/[password]@[connectstring]
    @[OraHome]\forms\create_webutil_db.sql
    -- Inspect SQL*Plus output for errors, and then
    CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
    Reconnect as SYSTEM, and issue:
    grant execute on webutil_db to public;
    5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
    to the CLASSPATH entry.
    6) Start the OC4J instance
    7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
    Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
    It is important to generate the PLX, to avoid the FRM-40039 discussed in
    Note 303682.1
    If the PLX is not generated, the Webutil.pll library would have to be attached with
    full path information to all forms wishing to use WebUtil. This is NOT recommended.
    8) Create a new FMB.
    Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
    There is no need to Subclass the WebutilConfig object.
    Attach the Webutil.pll Library, and remove the path.
    Add an ON-LOGON trigger with the code
    NULL;
    to avoid having to connect to an RDBMS (optional).
    Create a new button on a new canvas, with the code
    show_webutil_information (TRUE);
    in a WHEN-BUTTON-PRESSED trigger.
    Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
    the "Application Server URL" is empty.
    Then append "?config=webutil" at the end, so you end up with a URL of the form
    http://server:port/forms/frmservlet?config=webutil
    10) Run your form.
    If its Correct/Helpful please mark it thanks.
    Sarah

  • Using JOptionPane in a non-event dispatching thread

    I am currently working on a screen that will need to called and displayed from a non-event dispatching thread. This dialog will also capture a user's selection and then use that information for later processing. Therefore, the dialog will need to halt the current thread until the user responds.
    To start, I tried using the JOptionPane.showInputDialog() method and set the options to a couple of objects. JOptionPane worked as advertised. It placed the objects into a combobox and allowed the user to select one of them. However, it also gave me something unexpected. It actually paused the non-event handling thread until the user had made a selection. This was done without the JOptionPane code being wrapped in a SwingUtilities.invokeLater() or some other device that would force it to be launched from an Event Handling Thread.
    Encouraged, I proceeded to use JOptionPane.showInputDialog() substituting the "message" Object with a fairly complex panel (JRadioButtons, JLists, JTextFields, etc.) that would display all of the variety of choices for the user. Now, when the screen pops up, it doesn't paint correctly (like what commonly occurs when try to perform a GUI update from a non-event dispatching thread) and the original thread continues without waiting for a user selection (which could be made if the screen painted correctly).
    So, here come the questions:
    1) Is what I am trying to do possible? Is it possible to create a fairly complex GUI panel and use it in one of the static JOptionPane.showXXXDialog() methods?
    2) If I can't use JOptionPane for this, should I be able to use JDialog to perform the same type function?
    3) If I can use JDialog or JFrame and get the threading done properly, how do I get the original thread to wait for the user to make a selection before proceeding?
    I have been working with Java and Swing for about 7-8 years and have done some fairly complex GUIs, but for some reason, I am stumped here. Any help would be appreciated.
    Thanks.

    This seems wierd that it is functioning this way. Generally, this is what is supposed to happen. If you call a JOptionPane.show... from the Event Dispatch Thread, the JOptionPane will actually begin processing events that normally the Event Dispatch Thread would handle. It does this until the user selects on options.
    If you call it from another thread, it uses the standard wait and notify.
    It could be that you are using showInputDialog for this, try showMessageDialog and see if that works. I believe showInputDialog is generally used for a single JTextField and JLabel.

  • Not Running on the Event Dispatch thread, but UI still freezes

    The environment: I am currently working on an application that requires some heavy lifting in response to user input on a UI. To do this I am using a version of SwingWorker that was backported from java 1.6 to java 1.5 in conjunction with a slew of custom threads.
    The problem: I am currently running into an issue where I am not operating on the Event Dispatch thread (checked by doing a javax.swing.SwingUtilities.isEventDispatchThread()) but the UI is still freezing during this section. The operation involves a loop with about 2000 iterations and contains several file accesses. I have thought about how to make a new thread to perform the same operation, but I do not see how it would be any different since as it is I am not on the EDT. The call is being made from doInBackground and specifically the piece that is slowing things down is the File Accesses (2 for every iteration of the loop). At this point I am not sure how to go about resolving the issue. Any one have any suggestions?

    I am not operating on the Event Dispatch threadThat is the problem. Use multiple threads for GUI, which should delegates to the EDT, and your app logic.

  • Event Dispatch Thread Hangs, what is wrong?

    The Event Dispatch Thread Hangs when showing a modal dialog while running a
    SwingWorker Thread.
    I have included my code at the bottom of the page. There are three classes. I have posted a bug report to red hat. But I want to make sure my code is correct.
    My test case just puts the SwingWorker to sleep
    but the problem occurs if I do something real, like connect to a database, etc.
    Also I have tried little different variations of the logic calling
    setVisible(true)/(false) in different places and the same problem occurs.
    It seems to work with Sun JDK, note I am using IcedTea with Fedora Core 8.
    Version-Release number of selected component (if applicable):
    [szakrews@tuxtel ~]$ java -version
    java version "1.7.0"
    IcedTea Runtime Environment (build 1.7.0-b21)
    IcedTea Client VM (build 1.7.0-b21, mixed mode)How reproducible:
    Every couple times.
    javac TestClass2
    java TestClass2eventually it will hang. If it doesn't try again.
    You don't have to wait for the program to finish either.
    The program runs the Dialog 10 times but it never works or fails in the middle, it will either work or fail from the first dialog displayed.
    I have included a thread dump. That is about the most informative information I can get. Neither tracing nor writing a custom ThreadQueue or Drawing Manager to trace events produces any helpful information.
    Actual results:
    The JProccessBar won't move, and the SwingWorker finishes but the done() method is never run. The PROGRAM is not hung however because if I close the dialog then it will continue.
    Expected results:
    The JProccessBar should always move and the SwingWorker should always run the done() method.
    Additional info:
    java thread dump after freeze, taken with kill -s SIGQUIT <pid>
    2008-06-25 12:25:50
    Full thread dump IcedTea Client VM (1.7.0-b21 mixed mode):
    "DestroyJavaVM" prio=10 tid=0x938afc00 nid=0x1419 waiting on condition
    [0x00000000..0x0018a074]
       java.lang.Thread.State: RUNNABLE
    "AWT-EventQueue-0" prio=10 tid=0x938ae400 nid=0x1429 in Object.wait()
    [0x07f96000..0x07f96f04]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x96748f80> (a java.awt.EventQueue)
            at java.lang.Object.wait(Object.java:503)
            at java.awt.EventQueue.getNextEvent(EventQueue.java:485)
            - locked <0x96748f80> (a java.awt.EventQueue)
            at
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:248)
            at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
            at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
            at java.awt.Dialog$1.run(Dialog.java:1073)
            at java.awt.Dialog$3.run(Dialog.java:1127)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.Dialog.show(Dialog.java:1125)
            at java.awt.Component.show(Component.java:1456)
            at java.awt.Component.setVisible(Component.java:1408)
            at java.awt.Window.setVisible(Window.java:871)
            at java.awt.Dialog.setVisible(Dialog.java:1012)
            at net.xtel.production.WaitDialog.showWaitDialog(WaitDialog.java:72)
            at net.xtel.production.WaitDialog.showWaitDialog(WaitDialog.java:102)
            at TestClass2.showWait(TestClass2.java:79)
            at TestClass2.createAndShowGUI(TestClass2.java:126)
            at TestClass2.access$0(TestClass2.java:114)
            at TestClass2$3.run(TestClass2.java:138)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:227)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:603)
            at
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
            at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
            at
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
    "AWT-Shutdown" prio=10 tid=0x938ad000 nid=0x1428 in Object.wait()
    [0x03ea7000..0x03ea7f84]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x96749268> (a java.lang.Object)
            at java.lang.Object.wait(Object.java:503)
            at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:281)
            - locked <0x96749268> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:675)
    "AWT-XAWT" daemon prio=10 tid=0x938a8400 nid=0x1423 runnable
    [0x02ccc000..0x02ccd104]
       java.lang.Thread.State: RUNNABLE
            at sun.awt.X11.XToolkit.waitForEvents(Native Method)
            at sun.awt.X11.XToolkit.run(XToolkit.java:550)
            at sun.awt.X11.XToolkit.run(XToolkit.java:525)
            at java.lang.Thread.run(Thread.java:675)
    "Java2D Disposer" daemon prio=10 tid=0x93854000 nid=0x1421 in Object.wait()
    [0x07aea000..0x07aead84]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x966e7010> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            - locked <0x966e7010> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:150)
            at sun.java2d.Disposer.run(Disposer.java:143)
            at java.lang.Thread.run(Thread.java:675)
    "Low Memory Detector" daemon prio=10 tid=0x93c15000 nid=0x141f runnable
    [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=10 tid=0x93c13400 nid=0x141e waiting on condition
    [0x00000000..0x03a8a954]
       java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=10 tid=0x93c11c00 nid=0x141d waiting on
    condition [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=10 tid=0x095e7000 nid=0x141c in Object.wait()
    [0x005d2000..0x005d3004]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x966e71d8> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            - locked <0x966e71d8> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:150)
            at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)
    "Reference Handler" daemon prio=10 tid=0x095e2400 nid=0x141b in Object.wait()
    [0x00581000..0x00582084]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x966e7260> (a java.lang.ref.Reference$Lock)
            at java.lang.Object.wait(Object.java:503)
            at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:134)
            - locked <0x966e7260> (a java.lang.ref.Reference$Lock)
    "VM Thread" prio=10 tid=0x095dec00 nid=0x141a runnable
    "VM Periodic Task Thread" prio=10 tid=0x93c17400 nid=0x1420 waiting on condition
    JNI global references: 836
    Heap
    def new generation   total 960K, used 152K [0x93f40000, 0x94040000, 0x966a0000)
      eden space 896K,   9% used [0x93f40000, 0x93f56148, 0x94020000)
      from space 64K, 100% used [0x94020000, 0x94030000, 0x94030000)
      to   space 64K,   0% used [0x94030000, 0x94030000, 0x94040000)
    tenured generation   total 4096K, used 1088K [0x966a0000, 0x96aa0000, 0xb3f40000)
       the space 4096K,  26% used [0x966a0000, 0x967b01b0, 0x967b0200, 0x96aa0000)
    compacting perm gen  total 12288K, used 9169K [0xb3f40000, 0xb4b40000, 0xb7f40000)
       the space 12288K,  74% used [0xb3f40000, 0xb4834740, 0xb4834800, 0xb4b40000)
    No shared spaces configured.CLASS1:
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.sql.SQLException;
    import java.util.concurrent.ExecutionException;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.RepaintManager;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class TestClass2 extends JFrame implements ActionListener {
            /** Action Command for <code>searchbtn</code> */
            public static final String SEARCH_BTN_ACTION = "search_btn_action";
             * Constructor.
            public TestClass2() {
                    setSize(650, 350);
                    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
                    setLocation(screenSize.width / 2 - getSize().width / 2,
                                    screenSize.height / 2 - getSize().height / 2);
                    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                    addWindowListener(new WindowAdapter() {
                            @Override
                            public void windowClosing(WindowEvent e) {
                                    exit();
                    JPanel panel = new JPanel();
                    add(panel);
                    setVisible(true);
            @Override
            public void actionPerformed(ActionEvent e) {
                    if (e.getActionCommand().equals(SEARCH_BTN_ACTION)) {
                            JOptionPane.showMessageDialog(this, "Button Pressed");
            public void showWait() {
                    try {
                            WaitDialog.showWaitDialog(this, "Testing...", new SwingWorkerInterface(){
                                    @Override
                                    public Object workToDo() throws Throwable {
                                            Thread.currentThread().sleep(3000);
                                            return null;
                    } catch (InterruptedException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                    } catch (ExecutionException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
             * Exits the program.
            public void exit(){
                    System.exit(0);
             * Create the GUI and show it. For thread safety, this method should be
             * invoked from the event-dispatching thread.
             * @throws UnsupportedLookAndFeelException
             * @throws IllegalAccessException
             * @throws InstantiationException
             * @throws ClassNotFoundException
             * @throws NullInstanceVariableException
             * @throws SQLException
            private static void createAndShowGUI() {
                    // set look and feel
                    try{
                            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                            // Create instance of the ProductCatalog
                            TestClass2 root = new TestClass2();
                            for(int i = 0; i < 10; i++){
                                    root.showWait();
                    }catch(Exception e){
                            e.printStackTrace();
             * @param args
             *            this program does not use arguments
            public static void main(String[] args) {
                    SwingUtilities.invokeLater(new Runnable() {
                            public void run() {
                                    createAndShowGUI();
    }CLASS 2:
    import java.awt.Component;
    import java.awt.Frame;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.util.concurrent.ExecutionException;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    import javax.swing.SwingWorker;
    public class WaitDialog extends JDialog {
            private boolean disposed = false;
            private boolean displayed = false;
            private WorkerThread worker = null;
            WaitDialog(Frame parent, String text, SwingWorkerInterface in){
                    super(parent, true);
                    worker = new WorkerThread(in);
                    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                    addWindowListener(new WindowAdapter() {
                            @Override
                            public void windowOpened(WindowEvent e) {
                                    worker.execute();
                            @Override
                            public void windowClosing(WindowEvent e) {
                                    disposeWaitDialog();
                    this.setResizable(false);
                    JLabel message = new JLabel();
                    message.setText(text);
                    JProgressBar pb = new JProgressBar();
                    pb.setIndeterminate(true);
                    // set size and location
                    setSize(200, 100);
                    setLocationRelativeTo(parent);
                    JPanel panel = new JPanel();
                    panel.add(message);
                    panel.add(pb);
                    add(panel);
            public void showWaitDialog(){
                    if(displayed == true){
                            return;
                    if(disposed == true){
                            disposed = false;
                            return;
                    disposed = false;
                    displayed = true;
                    setVisible(true);
            public void disposeWaitDialog(){
                    if(disposed == true){
                            return;
                    if(displayed == true){
                            displayed = false;
                            setVisible(false);
                            return;
                    disposed = true;
                    displayed = false;
            public static Object showWaitDialog(Component parent, String text, SwingWorkerInterface in) throws InterruptedException, ExecutionException {
                    WaitDialog waitDialog = null;
                    if (parent == null) {
                            waitDialog = new WaitDialog(JOptionPane.getRootFrame(), text, in);
                    } else {
                            waitDialog = new WaitDialog(JOptionPane.getFrameForComponent(parent), text, in);
                    while(!waitDialog.worker.isDone()){
                            System.out.println("about to show");
                            waitDialog.showWaitDialog();
                            System.out.println("done showing");
                    waitDialog.dispose();
                    return waitDialog.worker.get();
            class WorkerThread extends SwingWorker<Throwable, Void> {
                    private SwingWorkerInterface in = null;
                    WorkerThread(SwingWorkerInterface in){
                            this.in = in;
                    public Throwable doInBackground(){
                                    try {
                                            System.out.println("about to do work");
                                            in.workToDo();
                                            System.out.println("done work no exception");
                                    } catch (Throwable e) {
                                            System.out.println("done work with exception");
                                            return e;
                                    return null;
                    public void done(){
                                    System.out.println("about to dispose");
                                    disposeWaitDialog();
                                    System.out.println("disposed");
    }CLASS 3:
    public interface SwingWorkerInterface {
            public Object workToDo() throws Throwable;
    }

    There's nothing directly wrong with it, but it will
    prevent other threads acquiring the class lock - but
    that may be what you want.True. Although the typical case for code that looks like this would be to use wait--usually the various threads in question require the same lock, so you have to use wait in order for the waiting thread to give it up and allow the other thread to do its work. Hard to say for sure though what he's doing.
    Also, if loading is all that the other thread does, and you're waiting for that thread to die, use join. But then, if that's the case, and you're only waiting for a single other thread, then you might as well just put it all in one thread, as already indicated.

  • I lost the grey, round shaped rubber placed under the magic trackpad to support clicking. the rubber detached from the trackpad and lost. Where can i find the thing as i am not sure whether apple sell small spare part like this?

    i had lost the grey, round shaped rubber placed under my magic trackpad. i think it detached from the trackpad body and lost. where can i get this small spare part as i couldn't find this small spare part in apple store?

    Wish I could be more positive but as far as I can see, the solution is to make something for yourself and tape it on.  It appears they do not supply a proper replacement and Ifixit, the usual people say they don't have them.
    Here is a company that supply rubber feet.   It may be worth contacting them and asking if they have something that will do the job.
    http://www.wowshop.co.uk/1%20inch%20rubber%20feet?_tt=g_1455876706_6722138569_56 292842294_c&gclid=COvs0q3pysECFavpwgodMU4APA

  • Information Regarding :Exception occurred during event dispatching

    Hi,
    I frequently get this exception when I click a button in a dialog and it opens up another frame of window. The exception trace includes java internal classes and my program classes line numbers. I have searched the net but could not get any concrete answer.
    Is this problem in java packages or should we take care of something in our code to avoid such exceptions.
    Below is the exception trace..........................
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1141)
    at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
    at javax.swing.JComponent.paintComponent(JComponent.java:541)
    at javax.swing.JComponent.paint(JComponent.java:808)
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4795)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4748)
    at javax.swing.JComponent._paintImmediately(JComponent.java:4692)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4495)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:409)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
    at java.awt.Dialog$1.run(Dialog.java:540)
    at java.awt.Dialog.show(Dialog.java:561)
    at java.awt.Component.show(Component.java:1192)
    at java.awt.Component.setVisible(Component.java:1147)
    at com.mycomp.example.DialogView.showWindow(DialogView.java:91)
    at com.mycomp.example.showWindow(StatusController.java:83)
    at com.mycomp.example.handleOk(ExampleController.java:842)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5159)
    at java.awt.Component.processEvent(Component.java:4956)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3674)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    Thanks in advance.

    Hi All,
    Thanks for the replies and information posted by you.
    Below is some code snippet: ( complete code posting is difficult) ;-)
    Dialog1 is open, clicking on button say start it hides the current Dialog1 and opens the status dialog for Dialog1.
    Also, we are making the current Thread to sleep to avoid flickering.
    dialog1.hideWindow(); // Hide current window...
    Thread.currentThread().sleep(5); // sleep to avoid flickering..
    statusDialog.showWindow(); // to display status window..
    I will check and try to do modifications as per your suggestions.
    Thanks.

  • JFileChooser : Exception occurred during event dispatching

    Hi,
    I'm having problems with sorting in 'Details' view of JFileChooser. I'm getting the following NullPointerException when I try to sort by clicking on the header of the JTable which I get in 'Details' view of a JFileChooser.
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at java.awt.EventQueue.isDispatchThread(Unknown Source)
    at javax.swing.SwingUtilities.isEventDispatchThread(Unknown Source)
    at javax.swing.JComponent.revalidate(Unknown Source)
    at javax.swing.JTable.resizeAndRepaint(Unknown Source)
    at javax.swing.JTable.sortedTableChanged(Unknown Source)
    at javax.swing.JTable.sorterChanged(Unknown Source)
    at javax.swing.RowSorter.fireRowSorterChanged(Unknown Source)
    at javax.swing.RowSorter.fireRowSorterChanged(Unknown Source)
    at javax.swing.DefaultRowSorter.sort(Unknown Source)
    at sun.swing.FilePane$DetailsTableRowSorter.access$1301(Unknown Source)
    at sun.swing.FilePane$DetailsTableRowSorter$1.call(Unknown Source)
    at sun.swing.FilePane$DetailsTableRowSorter$1.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Any operation performed in the JFileChooser after this exception will generate the same exception & no action is performed. I'm using Java 1.6.0_24. Strangely, this is happening only in client-server mode. Staand-alone is working fine.
    Please provide some urgent inputs to this problem
    Thanks
    Dilip

    Thanks 4 d reply mKorbel, I'm not creating a TableModel. I'm just creating a JFileChooser as shown below.
    JFileChooser fileChooser = new JFileChooser(location);
    fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    fileChooser.setMultiSelectionEnabled(false);
    fileChooser.setDialogTitle("Choose File");
    if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
    Now, the scenario is to bringup the FileChooser, go to Details view, apply sort on any column. This action creates the mentioned NullPointerException.

  • JTabbedPane: Exception occurred during event dispatching:

    Hi,
    I have a JTabbedPane where the tabs can be added dynamically by the method:
    private void addNewTab(JTable aTable) throws java.lang.NullPointerException
    final JTable t = aTable;
    Thread addTab = new Thread()
    public void run()
    JScrollPane scroller = new JScrollPane();
    JTable table;
    if (t==null)
    table = new JTable(columns, 0);
    else
    table = t;
    table.setColumnsEditable(colEditable);
    cachedTables.addElement(table);
    scroller.getViewport().setView(table);
    jtp.insertTab("Tab " + cachedTables.size(), null, scroller, "Tab", cachedTables.size()-1);
    jtp.updateUI();
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    jtp.setSelectedIndex(cachedTables.size()-1);
    jtp.validate();
    addTab.start();
    The problem is that occasionally (20% of the times) I receive this exception:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTabbedPaneUI.rotateInsets(BasicTabbedPaneUI.java:1159)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.getTabAreaInsets(BasicTabbedPaneUI.java:951)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateTabAreaHeight(BasicTabbedPaneUI.java:924)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.paintContentBorder(BasicTabbedPaneUI.java:637)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(BasicTabbedPaneUI.java:358)
         at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
         at javax.swing.JComponent.paintComponent(JComponent.java:395)
         at javax.swing.JComponent.paint(JComponent.java:687)
         at javax.swing.JComponent.paintChildren(JComponent.java:498)
         at javax.swing.JComponent.paint(JComponent.java:696)
         at javax.swing.JComponent.paintWithBuffer(JComponent.java:3878)
         at javax.swing.JComponent._paintImmediately(JComponent.java:3821)
         at javax.swing.JComponent.paintImmediately(JComponent.java:3672)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:370)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Does none know, how I can solve the problem?
    Thanks,
    Diego.

    Fix the NullPointerException. The stack trace tells you the line that caused the problem.

  • Exception occurred during event dispatching

    I'm facing a problem with dispatchCustomEvent() method while clicking a button on oracle form. The code is given below:
    package oracle.forms.finalbutton;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.StringTokenizer;
    import javax.swing.JButton;
    import oracle.forms.ui.CustomEvent;
    import oracle.forms.ui.VBean;
    import oracle.forms.ui.VButton;
    import oracle.ewt.button.PushButton;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.properties.Property;
    public class FinalButton extends VBean implements ActionListener
    public final static ID WBP = ID.registerProperty("BUTTONPRESSED");
    private IHandler m_handler;
    protected JButton b1 ;
    public FinalButton()
    super();
    b1 = new JButton("");
    b1.setActionCommand("push");
    b1.addActionListener(this);
    add(b1) ;
    public void actionPerformed(ActionEvent e) {
    CustomEvent ce = new CustomEvent(m_handler, WBP);
    // new URLProcess("http://rsb.info.nih.gov/ij/images/ct.dcm");
    new URLProcess("http://localhost/Sunset.jpg");
    dispatchCustomEvent(ce);
    public void init(IHandler handler)
    m_handler = handler;
    super.init(handler);
    The exception message thrown is given in the subject of this message. Now I need to know the details regarding event dispatching. Please someone help me.
    Thanks
    Rashed

    Hi
    Thanks...actually I want to click a button on Oracle Form and below is the actionPerformed method code:
    public void actionPerformed(ActionEvent e) {
    CustomEvent ce = new CustomEvent(m_handler, WBP);
    new URLProcess("http://rsb.info.nih.gov/ij/images/ct.dcm");
    dispatchCustomEvent(ce);
    I think my way of event dispatching isn't right. I need to instantiate an object of the class
    URLProcess on click event. Could you please let me know how can I get around the problem?
    Rashed

  • "Exception occurred during event dispatching". Help me, Please!

    Hi, All:
    when I runing my program, often catch below exception, I couldn't found where I'm wrong, and Why?
    Could you please, give the below exception and
    my code a quick search, and tell me how I to do it, and Why?
    sincerely
    yoursUrey
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:987)
    at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:917)
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:858)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
    at javax.swing.JComponent.paintComponent(JComponent.java:395)
    at javax.swing.JComponent.paint(JComponent.java:687)
    at javax.swing.JComponent.paintChildren(JComponent.java:498)
    at javax.swing.JComponent.paint(JComponent.java:696)
    at javax.swing.JViewport.paint(JViewport.java:668)
    at javax.swing.JComponent.paintWithBuffer(JComponent.java:3878)
    at javax.swing.JComponent._paintImmediately(JComponent.java:3821)
    at javax.swing.JComponent.paintImmediately(JComponent.java:3672)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:370)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
    EventQueueUtilities.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:987)
    at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:917)
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:858)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
    at javax.swing.JComponent.paintComponent(JComponent.java:395)
    at javax.swing.JComponent.paint(JComponent.java:687)
    at javax.swing.JComponent.paintChildren(JComponent.java:498)
    at javax.swing.JComponent.paint(JComponent.java:696)
    at javax.swing.JViewport.paint(JViewport.java:668)
    at javax.swing.JComponent.paintWithBuffer(JComponent.java:3878)
    at javax.swing.JComponent._paintImmediately(JComponent.java:3821)
    at javax.swing.JComponent.paintImmediately(JComponent.java:3672)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:370)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
    EventQueueUtilities.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    * the code of sort part *
    class TableMouseAdapter extends MouseAdapter{
    public void mouseClicked(MouseEvent env){
    Cursor headerCursor = tableHeader.getCursor();
    String cursorName = headerCursor.getName();
    Debug.println("Cursor Name : "+cursorName);
    TableColumnModel colModel = treeTable.getColumnModel();
    selectedColumnIndex = colModel.getColumnIndexAtX(env.getX());
    boolean isLeftMouse = SwingUtilities.isLeftMouseButton(env);
    if(isLeftMouse){
    if(cursorName.equalsIgnoreCase("Default Cursor")){
    if(env.getClickCount() == 2){
    // Sort the project of that column.
    model.sort(selectedColumnIndex);
    }else if(cursorName.equalsIgnoreCase("East Resize Cursor")){
    if(env.getClickCount() == 2){
    Debug.println("XLocation : "+env.getX());
    selectedColumnIndex = colModel.getColumnIndexAtX(env.getX()-10);
    Debug.println("Column index : "+selectedColumnIndex);
    if(selectedColumnIndex>0){
    // resize the width of this column.
    Vector columnValues = getColumnValues(selectedColumnIndex);
    int maxColumnWidth = getMaxColumnWidth(columnValues, selectedColumnIndex);
    resetColumnWidth(colModel, selectedColumnIndex, maxColumnWidth);
    //>> ******** the sort of the model in TableMouseAdapter
    public void sort(int columnIndex){
    this.sortColumnIndex = columnIndex;
    (new Thread(new ProjectSort(root))).start();
    //<< ******** the sort of the model in TableMouseAdapter
    //>>********** the sort thread run method ********************************
    public void run(){
    // Get the sorter from the stack, if the stack size is 0
    // then create a new sorter for the tree-table.
    MergeSort sorter = getSizeSorter();
    if( sorter == null )
    return ;
    // Set is Ascending sort or not ,
    if(oldSortColumn == sortColumnIndex){
    if(isSortAscending){
    isSortAscending = false;
    }else isSortAscending = true;
    }else {isSortAscending = false;}
    // if sort the tree table could not disply its originality node.
    // it would be disply its sort node
    isNeedOriginalityNode = false;
    sortNode(sorter, node);
    // when sort is over, then push the sort to the stack,
    // for to used at next time.
    recycleSorter(sorter);
    oldSortColumn = sortColumnIndex;
    // After the sort, you need to update the UI, and send the update
    // event to the EventCenter.
    treeTableView.getTreeTable().updateUI();
    EventCenter.broadcast(treeTableView.getTreeTable(), EventCenter.UPDATE, treeTableView.updateHashData());
    //<<********** the sort thread run method ********************************
    //>>********** the updateUI of the treeTableView.getTreeTable() *************
    public void updateUI() {
    TreePath selecedPath= null;
    if(tree!=null){
    selecedPath = tree.getSelectionPath();
    try{
    if(tree != null) {
    tree.updateUI();
    super.updateUI();
    // Use the tree's default foreground and background colors in the
    // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background",
    "Tree.foreground", "Tree.font");
    if(tree != null && selecedPath!=null) {
    //Set the seleted path after updateUI.
    tree.setSelectionPath(selecedPath);
    }catch(Exception exp){ exp.printStackTrace(); };
    //<<********** the updateUI of the treeTableView.getTreeTable() *************

    Dear, turingcomplete :
    Thanks for your help, I was changed the thread in my code, my problem was moved.
    thank you again
    sincerely
    yours Urey

  • Exception occurred during event dispatching: ArrayIndexOutOfBoundsException

    Java GUI app that runs fine in NT, ported over to Linux (sparc), recompiled and I get the following traceback when I run it, happens whenever I generate a SWING event. JDK 1.3.0. I have the same problem with the swingset sample app as well:
    Exception occurred during event dispatching:
    java.lang.ArrayIndexOutOfBoundsException: -1017
         at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1485)
         at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1355)
         at java.awt.Component.dispatchEventImpl(Component.java:2509)
         at java.awt.Container.dispatchEventToSelf(Container.java:1233)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2449)
         at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2314)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2189)     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
         at java.awt.Container.dispatchEventImpl(Container.java:1200)
         at java.awt.Window.dispatchEventImpl(Window.java:912)
         at java.awt.Component.dispatchEvent(Component.java:2499)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
         at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
    Here is also a small sample piece of code that makes it happen too. Whever I "hover" over the button this occurs.
    public class Test
    public static void
    main(String[] argv)
    throws Exception
    // set up GUI
    JFrame frame = new JFrame();
    frame.setBounds(0, 0, 100, 100);
    JPanel panel = new JPanel();
    frame.getContentPane().add(panel);
    panel.setLayout(new BorderLayout());
    panel.add(new JButton("Push me"), BorderLayout.NORTH);
    panel.add(new JLabel("Hello world"), BorderLayout.CENTER);
    frame.pack();
    frame.setVisible(true);
    return;

    In the case of this problem, it happens EVERY TIME I run the application (and happens with Swingset too) and it DOES affect the application. I can't click on buttons, etc. All swing events seem to generate this trace back. I tried recompiling all the code thinking I might have a bad class file or something, but to no avail. Could this be a version mis-match? I'm running Linux 6.2.

  • Exception occurred during event dispatching: Null pointer exception

    All,
    i have an applet which opens an applet window. in this applet window i have a list box.
    When a value in the list box is selected, i need to access a method in the applet(held in another class) that launches another window
    however i get the following error:
    Exception occurred during event dispatching: Null pointer exception
    (hope thats clear enough)
    p.s. i have created an instance of the class.

    That is not clear at all, but the cause for the exception is very easy:
    something is null that should not be null :)

  • In swing for painting is separte thread from event-dispatching thread

    hi,
    event -dispatching thread is diffenent from paint thread in swing ???

    I don't believe so... or if it is, they have a special relationship tieing them together.
    why?

Maybe you are looking for

  • Why do apps in tunes show "view in itunes", Why do apps in tunes show "view in itunes"

    Sometimes when I click on an app in itunes, instead of going to the regular profile page, where I can download it, it shows the internet browser version of the page (which you can usually access off apple site). And it has the "view in itunes" button

  • Convert values in loop to correct data types

    I need to convert the values in a loop to the correct data types. It compiles, but I get an error. It says, Exception in thread "main" java.lang.NumberFormat Excepton: A at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unkn

  • How the system will caluclate price in billing doucment

    hi gurus In billing doucment.( Invoice) how the price will come.  2)  What is the use of document pricing procedure in billing document ( vofa) controling fields.  Where do we use this document pricing procedure In which scenario this (document prici

  • XMLParser for PL/SQL ORA-20100

    I am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1 When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below. SQL> execute domsamp

  • Crash Report - how to read it?

    Below is my latest crash report, can someone tell me what caused it? I simply can't interpret these reports. THANKS! My set up is: Mac mini 10.6.2, Logic 8, Konnekt 24D, Kontakt 4 Player, EWQL Gold. Process: Logic Pro [139] Path: /Applications/Logic