Results 1 to 5 of 5
  1. #1
    Drun's Avatar
    Drun is offline Member
    Join Date
    Nov 2009
    Location
    Indian Head, MD (Missing Pittsburgh PA)
    Posts
    44
    Rep Power
    0

    Default Getting to the top level dialog from sub-tabs.

    If I am in a sub-tab of a tab in a dialog box, is there
    1) an easy way to get a refernce to the main dialog box.
    2) how can I get a list/array/whatever to the top tab list.
    I have tried adding a listener on the control I get back when I call the getControl() funciton I add the listener on getControl.addListener(SWT.Show,listener); to test things out I have a few dialog boxes pop to see what values exist in side the listener classes (simple JOptionPane.showMessages) the problem is, instead of coming up after the dialog box is shown, they come up BEFORE the dialog box is shown, so when I try to read things from the dialog box the elements don't really exist and I get nulls back.
    So what am I missing, is there a way to get the parent dialog box from an object that is inside of the dialog box. When I get this parent object then what is the easiest way to get the list of the high level tabs (I am assuming they are the next level of objects down)
    Michael P. O'Connor
    http://www.mikeoconnor.net

  2. #2
    aaroncarpet's Avatar
    aaroncarpet is offline Senior Member
    Join Date
    Nov 2009
    Location
    California
    Posts
    147
    Rep Power
    0

    Default

    tabbed JDialogue??? which container which component or is it a tabbed awt.pane


    they throw headless exceptions.....try and catch your dialogues and put system.out.println(e.getsource()); ...you still have the shell? java not javaw


    Java Code:
     JDialogue  FU =  new JDialogue();
             try {FU.[[whatever method here]]] } 
            catch (Exception e) { System.out.println("FU has thrown an exception"); System.out.println(e.getSource()); }
    Last edited by aaroncarpet; 11-18-2009 at 11:47 PM.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Quote Originally Posted by aaroncarpet View Post
    tabbed JDialogue??? which container which component or is it a tabbed awt.pane
    My guess (and it's just a guess as we're not given much info here), is that the OP is asking an SWT question, not an AWT/Swing question.

  4. #4
    Drun's Avatar
    Drun is offline Member
    Join Date
    Nov 2009
    Location
    Indian Head, MD (Missing Pittsburgh PA)
    Posts
    44
    Rep Power
    0

    Default

    I am inside a DialogPage object here (aka it inherits from DialogPage), which I believe inherits from the component object. and correct me if I am wrong, but does not the Eclipse RCP extend off of SWT, that is why I am using the SWT.Show as the event for the listener. But what confuses me is that the even fires off before the dialog box is even one the screen, I would have assumed that the show even would not fire till after the dialog is fully displayed on the screen.
    Last edited by Drun; 11-19-2009 at 05:06 AM. Reason: to add just a little bit more info.
    Michael P. O'Connor
    http://www.mikeoconnor.net

  5. #5
    aaroncarpet's Avatar
    aaroncarpet is offline Senior Member
    Join Date
    Nov 2009
    Location
    California
    Posts
    147
    Rep Power
    0

Similar Threads

  1. SWT tabs with Draw2d
    By garyscarter in forum SWT / JFace
    Replies: 0
    Last Post: 07-07-2009, 03:31 PM
  2. [SOLVED] Class-level vs Object-level method()
    By mfaizan24 in forum New To Java
    Replies: 7
    Last Post: 06-23-2009, 09:18 AM
  3. Arrangement of tabs in JTabbedPane
    By swapnilnawale in forum AWT / Swing
    Replies: 0
    Last Post: 03-20-2009, 07:27 PM
  4. Adding tabs from classes
    By bubbless in forum AWT / Swing
    Replies: 13
    Last Post: 03-08-2009, 12:52 AM
  5. JMenu with Tabs using swing
    By phil128 in forum AWT / Swing
    Replies: 1
    Last Post: 03-03-2009, 03:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •