Inheriting from inner classes

TIJ has a section on inheriting from inner classes, but the author didn't illustrate a scenario. What could be the possible usage? Why would one want to only inherit the inner case, but have to initialize the outter class (which it doesn't want to inherit)?
Example code in the book:
    //: c08:InheritInner.java
    // Inheriting an inner class.
    class WithInner {
      class Inner {}
    public class InheritInner extends WithInner.Inner {
      //! InheritInner() {} // Won't compile
      InheritInner(WithInner wi) {
        wi.super();
      public static void main(String[] args) {
        WithInner wi = new WithInner();
        InheritInner ii = new InheritInner(wi);
    } ///:~

I've certainly never felt the need to extend inner
classes. As far as I'm concerned, inner classes are
great for certain uses, all of which involve them
being private. I've yet to find a scenario where a
non-private inner class is preferable to a 'proper'
class.To make the outer class act as a factory. The inner class is public but the constructors are private.

Similar Messages

  • Local variable can't be accessed from inner class ???????? Why ??????

    Plesae help, help, help. I have no idea what to do with this bug.........
    <code>
    for ( int i = 0; i <= 2; i++ ) {
    for ( int j = 0; j <= 2; j++ ) {
    grids[i][j] = new MyButton ();
    grids[i][j].setBorder(but);
    getContentPane().add(grids[i][j]);
    MyButton sub = grids[i][j];
    sub.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if ( sub.getState() == 0 ) {
         sub = new MyButton( (Icon) new ImageIcon(imageFile));
         if ( imageFile.equals("cross.jpg") ) {
              sub.changeState(1);
         else {
              sub.changeState(2);
    </code>
    The compiler complains that "sub" is in the inner class, which is the ActionListener class, must be declared final. Please tell me what to do with it. I want to add an ActionListener to each MyButton Object in the array. Thanks ......

    OK, now I changed my code to this :
    for ( int i = 0; i <= 2; i++ ) {
      for ( int j = 0; j <= 2; j++ ) {
        grids[i][j] = new MyButton ();
        grids[i][j].setBorder(but);
        getContentPane().add(grids[i][j]);
        grids[i][j].addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
            if ( grids[i][j].getState() == 0 ) {
               grids[i][j] = new MyButton( (Icon) new ImageIcon(imageFile));
              if ( imageFile.equals("cross.jpg") ) {
               grids[i][j].changeState(1);
              else {
              grids[i][j].changeState(2);
    [/cpde]
    Thanks for your advice !!!!!!
    Now the compiler says that i and j are local variables accessed from inner classes, needs to be declared final. How can I solve this then ???

  • How to access super of enclosing class from inner class?

    Hello,
    I'd like to access Base.foo() from inner class in overridden Improved.foo(), but seem unable:
    public class InnerSuper {
         public static class Base {
              protected int foo() {
                   return 1;
         public static class Improved extends Base {
              @Override
              protected int foo() {
                   return Integer.parseInt(new Object () {
                        public String toString() {
                             return "1"+foo() ;
                   }.toString());
         public static void main(String[] args) {
              System.out.println(new Improved().foo());
    }The code above does not work, as it recursively calls Improved.foo() where I'd like it to call Base.foo(). What syntax construct should I use? Improved.this would be the same thing, Improved.super does not exist.
    I came up with a work around: adding a method baseFoo() to Improved and call that in the inner class:
       int baseFoo() {
          return super.foo();
       } but remain wondering if that is necessary?

    Indeed, Improved.super.foo() is allowed. My Eclipse syntax highlighting seems to have the same opinion as you: "are you sure you want to write that kind of code?" and leaves the read underlining for a syntax error on for just a second longer.
    This is where I am now:
         public static class DeferredExecSubroutineCall extends SubroutineCall {
              RelayExecutor relay;
              public DeferredExecSubroutineCall(RelayExecutor relay) {
                   this.relay = relay;
              @Override
              protected String execute(final IFDSOC fd, final String commandText) {
                   Future<String> f = relay.submit(new Callable<String>() {
                        @Override
                        public String call() throws Exception {
                             return DeferredExecSubroutineCall.super.execute(fd, commandText);
                   try {
                        return f.get();
                   } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                   } catch (ExecutionException e) {
                        if (e.getCause() instanceof RuntimeException) {
                             throw (RuntimeException) e.getCause();
                        } else {
                             throw new RuntimeException(e.getCause());
         }which is my current effort of adding concurrency to an existing project. I find it quite elegant but I am interested to hear from you...

  • Setting variables from inner class

    I have a GUI that takes users information and provides a quotation as componants are clicked. My componants' Listeners are in seperate inner classes and from these I want to add certain details to variables, it seems to compile and run but it doesn't seem to be changing the value of the variable when the componants are clicked, is there any reason why this happens, my code is below:
    public class MyGUI extends JFrame{
            public MyGUI(){
              //GUI STUFF HERE
            double Price;
         private String total=calculate();
         public String calculate(){
              double aTotal=Price;
              return "$ " + aTotal;
         class MyListener implements ItemListener{
              public void itemStateChanged(ItemEvent evt){
                   if(evt.getSource()==rad1) {
                   Price=0.10;
                   else if(evt.getSource()==rad2) {
                   Price=0.12;
                        totalLab.setText(total);
    }

    shouldn't I also be able to access the outer classes methods? It doesn't seem to do this either.

  • Accessing Enclosing Class Members From Inner Class Subclass

    I have the following scenario that I cannot get to work. Notice the comments in B.doWork() for the problem code. In B.doWork(), how do I access m_strA?
    * A.java
    * Created on July 5, 2002, 2:20 PM
    package Projects.InnerTrouble.Files;
    public class A {
         public abstract class InnerA {
              public abstract void doWork ();
         public String m_strA;
         /** Creates new A */
         public A ()
                   new InnerA() {
                             public void doWork ()
                                       System.out.println("A$InnerA$1's doWork() called!");
                                       m_strA = "Annonymous subclass of InnerA's doWork did this";
                        }.doWork();
         * @param args the command line arguments
         public static void main (String args[])
                   A oTemp = new A();
                   System.out.println(oTemp.m_strA);
                   B.getB(oTemp).doWork();
                   System.out.println(oTemp.m_strA);
    class B extends A.InnerA {
         public B (A a)
                   a.super();
         public void doWork ()
                   System.out.println("B's doWork() called!");
                   // How do I access m_strA within B's doWork() method?  The following is what I would expect to be the answer, but it does not compile
                   // A.this.m_strA = "B's doWork did this";
         private static A.InnerA sm_oInnerA;
         public static A.InnerA getB (A a)
                   if (sm_oInnerA == null)
                        sm_oInnerA = new B(a);
                   return (sm_oInnerA);

    The whole point is that B is not an inner class of A
    so it does not have access to A's member variables.
    Eventhough B extends an inner class of A, that does
    not make B an inner class of A. That is in the JLS,
    but not so elegantly as I have put it, hehe.
    If B were an innerclass of InnerA, then it would
    qualify to access A's member variables.OK, I think that you are finally getting through to my thick skull on this one. Let me restate and get your check-off on my understanding of the situation.
    The only classes with access to A's this reference are A and inner classes of A that are found within the definition of A. So, despite the fact that A and B are in the same package (and B should have access to A's non-private members because B and A are in the same package), and despite the fact that we would normally state that B "is a" InnerA (which is an inner class of A and would have access to a reference to the A.this reference), B is not allowed access to A.this (because B "is not really a" InnerA in the same way that the anonymous implementation of InnerA "is a" InnerA). However, nothing would prevent me from giving B access to a reference of the enclosing A as long as it was done via a method of InnerA, and as long as the implementation of that method is contained in A's implementation.
    Does this "access" rule realy make sense? Are you aware of the justification for this rule? Or is the justification stated in the JLS? I would think that the compiler ought to be able to figure this kind of thing out and allow it. It seems to me the fact that I defined B in the way that I did, and the fact that B "is a" InnerA, implies that I desired a fairly tight relationship to A. In fact, I desired the exact relationship that exists for the anonymous implementation of InnerA.
    The following is a modified version of my original example that runs as I originally wanted it to, but works around the access rules discussed on this forum thread:
    * A.java
    * Created on July 5, 2002, 2:20 PM
    package Projects.InnerTrouble.Files;
    public class A {
         public abstract class InnerA {
              public abstract void doWork ();
              /** added to allow implementors of InnerA that are not enclosed in A's class definition to have access to the enclosing class */
              public A myEnclosingInstance ()
                        return (A.this);
         public String m_strA;
         /** Creates new A */
         public A ()
                   new InnerA() {
                             public void doWork ()
                                       System.out.println("A$InnerA$1's doWork() called!");
                                       m_strA = "Annonymous subclass of InnerA's doWork did this";
                        }.doWork();
         * @param args the command line arguments
         public static void main (String args[])
                   A oTemp = new A();
                   System.out.println(oTemp.m_strA);
                   B.getB(oTemp).doWork();
                   System.out.println(oTemp.m_strA);
    class B extends A.InnerA {
         public B (A a)
                   a.super();
         public void doWork ()
                   System.out.println("B's doWork() called!");
                   // The following is what I would expect to be the answer, but it does not compile
                   // A.this.m_strA = "B's doWork did this";
                   // added myEnclosingInstance() to get functionality desired above
                   myEnclosingInstance().m_strA = "B's doWork did this";
         private static A.InnerA sm_oInnerA;
         public static A.InnerA getB (A a)
                   if (sm_oInnerA == null)
                        sm_oInnerA = new B(a);
                   return (sm_oInnerA);
    }

  • Access from inner class

    hi all,
    I have one frame with two panels inside, code likes the following:
    public class ShowChart extends JFrame{
    Container f = getContentPane();
    f.setLayout(new BorderLayout());
    JPanel chart=new drawChart();
    JPanel setting=new settingChart(chart);
    f.add(setting,java.awt.BorderLayout.WEST);
    f.add(chart);
    class drawChart extends JPanel(){
    setTableWidth(int w){...}
    class settingChart extends JPanel(){
    drawChart chart;
    pubic settingChart(drawChart c){
    chart=c;
    JTextField width = new JTextField("9",4);
    add(width);
    JButton change = new JButton("Change");
    change.addActionListener(new changeHandle(chart));
    add(change);
    change.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent event){
    int w = (int)Double.parseDouble(width.getText());
    chart.setTableWidth(w);
    Compilling error: local virable chart is accessed from within inner class, need to be declared as final. chart.setTabelWidth(w);
    how can i deal with this problem? (i know it will be ok if i messy all the viriables and method of settingChart into the ShowChart class, but it seems not a nice way...)
    thanks
    dejie

    Below is an example of an inner class field 'masking' the name of the outerclass field. So to access the outerclass you use OuterClass.this and then the field of that class...
    public class OuterClass {
      private int value = 1;
      class InnerClass {
        int value = 2;
        public InnerClass() {
          doStuff();
        void doStuff() {
          this.value++;
          OuterClass.this.value++;
    }Hope that helps...

  • Re: Inheritance and Inner classes

    Sorry all,
    I forgot to include that I loose the inner classes in codesense. And
    the editor will not let me reference them.
    Thanks again,
    Stu
    "Stu Pidasso" <[email protected]> wrote in message
    news:41fe9aac$[email protected]..
    Hello all,I'm an Eclipse and Nitro newby here, and I was wondering if anyone had any
    insight into this. I'm subclassing a "Constants" class that contains some
    static variables, static methods and static inner classes. Once I
    subclass,
    and refer to my new class, I loose all the parent class' inner classes.
    Is
    there a way around this? Or, am I hosed and have to put in a bug report
    somewhere? I know that in JBuilder this functionality works fine.
    Thanks,
    Stu

    K ive done as suggested and added a constructor that calls its superclass contrustor but its still not working. :(
    Any clues ?
    public abstract class shape {
    int pi;
    int radius;
    class twoD extends shape {
    twoD(int r, int p) {   //constructor for circle
    radius = r;
    pi = p;
    public void setAreaCircle() {   // area of circle method
    int circleArea = pi * radius^radius;
    System.out.println(circleArea);
    public void setCircumCircle() {   // circumfreanceof circle method
    int circleCircum = 2 * pi^radius;
    System.out.println(circleCircum);
    public class circle extends twoD {
    public static void main(String args[]) {
    public circle(int r, int p) {     // call to superclass constructor
    super(r,p);
    twoD ob = new twoD(5,10);
    ob.setAreaCircle();
    ob.setCircumCircle();

  • Overloading constructor of a child that inherits from a class that inherits from Windows.Forms

    The title might be a bit confusing so here is the layout.
    - classHForm inherits System.Windows.Forms.Form
    - frmDoStuff inherits classHForm  (written by someone else and used in several applications)
      - does not have a constructor specifically defined, so I added the following thinking it would override the parent
    Sub Public New()
    End Sub
    Sub Public New(byval data as string)
    'do stuff
    End Sub
    In my code, I want to instantiate frmDoStuff, but I need to overload it's constructor and populate fields within this form. The problem I'm running into is that when I run this, it is using the constructor from classHForm and ignores any constructor in frmDoStuff.
    I guess you can't override the parent constructor? Is that why it won't work?
    I didn't want to overload the classHForm constructor, but I will if that's the way to go.
    my code:
    dim frm as new frmDoStuff(myString)
    Note: I would love to show actual code, but not allowed. Against company rules.

    Your code is similar. The value I pass into frmDoStuff is supposed to set a value for a textfield.
    Public Class frmDoStuff
    Inherits classHForm
    Public Sub New(ByVal s As String, ByVal gridData() as String)
    txtMyTextField.text = s LoadGrid(gridData)
    End Sub
    I also have a datagridview I need to populate in frmDoStuff and thought I would have another string or string array as a second parameter to the constructor and then call a routine from the constructor to populate the datagrid.
    of course, when I run it this way, the code is not being reached. I'll build an example as COR suggested and maybe someone will see where I'm going wrong.
    [UPDATE]
    I created a simple example and it worked. So, now I need to try to understand what is different in the actual code.
    Here is my example:
    Parent Class inherits form
    Imports System.Windows.Forms
    Public Class classMyForm
    Inherits System.Windows.Forms.Form
    Sub New()
    ' This call is required by the designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
    End Sub
    End Class
    Public Class frmDoStuff
    Inherits classMyForm
    Public Sub New()
    ' This call is required by the designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
    End Sub
    Public Sub New(ByVal sStuff As String)
    MyBase.New()
    InitializeComponent()
    'Populate the textbox
    TextBox1.Text = sStuff
    End Sub
    End Class
    Public Class frmMyForm
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim frm As New frmDoStuff(TextBox1.Text)
    frm.Show()
    End Sub
    End Class
    Just to recap. The actual parent was created a few years ago and the child form that I'm calling, "frmDoStuff" was created a couple years back and is used in several applications. I need to use it in my application, but I need to populate a couple
    controls when the form is loaded. As you can see in this example, I successfully overloaded the constructor to populate the textbox in frmDoStuff.
    In my real life situation, my overloaded constructor seems to be getting ignored when i step through the code. I'll go back and do some more testing.

  • Problem writing a New ToPass inheriting from ToCustom.class

    Hi,
    we are writing a new ToPass but we have two problems:
    For a deletion of a user we need two parameters, but the method "deleteEntryCustom(String arg0)" only supports one parameter. We tried to concatenate two parameters and split them within the method, but we always get the same error-Message "putNextEntry failed storing ....".
    Is anybody out there, who can help?
    Kind regards,
    Achim Heinekamp

    Hi Dominik,
    thank you for your Reply.
    I think, the problem is not the InitCustom().
    We use the InitCustom() to establish a connection to the target.
    With the entry "changetype = delete" in the ToPass-Configuration the method "deleteEntryCustom()" is going to be started, isn't it?
    I tried returncodes "0" and "1" für "deleteEntryCustom". I haven't tried any other numbers.
    I tried the method "logIt()" several times but it didn't help me with this particular problem.
    I forgot the information, that the deletion was executed.
    best regards,
    Achim
    Edited by: Achim Heinekamp on Aug 13, 2008 1:35 PM

  • Extending a member inner class

    I have a class
    public class A{
    class InnerClassB{
    Now the question is how to extend the inner class would it be
    class ExtendingInnerClassB extends A.B{
    or else?
    I am not sure anybody knows?

    Regarding inheritance from inner classes you must define your constructor:
    public ExtendedInnerClass(EnclosingClass EC) { EC.super(); }
    why?????
    well
    1. Where is the handle? The handle is an internal thing which is designed to accept the enclosing class. It is something which is not in the programmer's control. when there is an inner class, it is natural that the inner class cannot exist without its outer class. And that is the reason why the instantiation of an inner class is done using new OuterClass().new Innerclass(). U can see that the innerClass object is created based on the outer class object (assuming that the inner Class is not static). I hope that this is clear. Now .. the whole point is how does the compiler know that the Outerclass is the enclosing class? When the above line is compiled, the tricky handle in the inner class is assigned to the Outer class. So any reference henceforth is made based on this handle.
    2. In the Inherited Inner class, there is no way to assoicate the handle in the above manner. Hence we are forcing by calling the super().
    3 Otherwise why not simply create with: new InheritedInnerClass(EnclosingClass)? This is not possible. What if the inherited inner class needs a constructor in the above manner. That is assume that there is a class A. Then if the Inner Class needs the constructor to be InnerClass(A a, EnclosingClass b) for some other purpose, then what judgement can the compiler take? So that answers the question <b>Can't the compiler compile the inherited inner class assuming a handle to the enclosing class and then force an instance to be created using the EnclosingClass.new syntax?</b> Becuase in this case it cant go by any assumption.
    4. Maybe the compiler designers can make some change such that the inherited inner class should have all its constructors beginning with the enclosing object and there should be atleast one constructor. But somehow I feel that it is too much of asking.

  • Migrating from eVC++4.0 to VS2008: Menu Bar not coming for class inherited from CProterty sheet

    We are migrating code developed in eVC++4.0 to Visual Studio 2008. We are facing a Problem as descripted below. We are using Pocket PC 2003 emulator.
    We are creating a class inherited from CPropertySheet. As below:
    In Header File:
    class COptionsSheet :
    public CPropertySheet
          DECLARE_DYNAMIC(COptionsSheet)
    #if(WINVER == 0x400)// This works for MenuBAr inherited from CDialog classes.
          CCommandBar m_cb;
    #else
          CCeCommandBar m_cb;
    #endif
    public:
    virtual BOOL OnInitDialog();
    We are drawing menu bar on the property window as below:
    In .CPP file:
    IMPLEMENT_DYNAMIC(COrderSheet, CPropertySheet)
    BEGIN_MESSAGE_MAP(COrderSheet, CPropertySheet)
    ON_COMMAND(ID_CUSTOMER_COLLECTPAYMENT, OnCustomerCollectpayment)
    ON_WM_INITMENUPOPUP()
    ON_NOTIFY(GN_CONTEXTMENU, 0, OnContextMenu)
    END_MESSAGE_MAP()
    BOOL COrderSheet::OnInitDialog()
    BOOL bResult = CPropertySheet::OnInitDialog();
    m_cb.Create(this);//This we have changed for VS 2008 as menu was not appearing for class inherited from CDialog class as well. In eVC++
    4.0 code we have used. Please see m_cb in header file discription
    m_cb.InsertMenuBar(IDR_ORDER1);// This calis unable to draw mwnu bar
    CMenu *pMenu = CWnd::GetMenu();
    //pMenu becomes NULL in very next line as we are passing it as parameter below.
    gPromotion.LoadSalesPromotions(pMenu,
    "Sales", SRC_TRACE_START);
    We tried this as well but it’s also not working:
    CMenu *pMenu = new CMenu;
          BOOL cehckStatus = pMenu->LoadMenu(IDR_ORDER1);
    SetMenu(pMenu);
          CRect r;  GetWindowRect(&r);
          r.bottom += GetSystemMetrics(SM_CYMENU);
          MoveWindow(r);
    Do we have to change or add something more for the menu bar in case of Property Sheet. Is there any change between eVC++ and Visual studio 2008 that we need to incorporate here.

    This forum is for POSReady. Please try one of the Windows CE forums:
    http://social.msdn.microsoft.com/Forums/en-US/category/windowsembeddedcompact
    -Sean
    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

  • Why are protected fields not-accessible from sub-classed inner class?

    I ran across a situation at work where we have to sub-class an inner class from a third-party package. So, it looks something like this...
    package SomePackage;
    public class Outer {
       protected int x;
       public class Inner {
    package OtherPackage;
    public class NewOuter extends Outer {
       public class NewInner extends Outer.Inner {
    }Now the NewInner class needs to access protected variables in the Outer class, just like the Inner class does. But because NewOut/NewInner are in a different package I get the following error message.
    Variable x in class SomePackage.Outer not accessible from inner class NewOuter. NewInner.You can still access those protected variables from the NewOuter class though. So, I can write accessor methods in NewOuter for NewInner to use, but I am wondering why this is. I know that if NewOuter/NewInner are in the same package as Outer/Inner then everything works fine, but does not when they are in different packages.
    I have to use JDK1.1.8 for the project so I don't know if there would be a difference in JDK1.2+, but I would think that nothing has changed. Anyway, if you know why Java disallows access as I have detailed please let me know.

    Although I don't have the 1.1.8 JDK installed on my system, I was able to compile the following code with the 1.3.1_01 JDK and run it within a Java 1.1.4 environment (the JVM in the MSIE 5.5 browser). As long as you don't access any of the APIs that were introduced with 1.2+ or later, the classes generated by the JDK 1.2+ javac are compatible with the 1.1.4+ JVM.
    //// D:\testing\SomePackage\Outer.java ////package SomePackage ;
    public class Outer {
        protected int x ;
        public Outer(int xx) {
            x = xx ;
        public class Inner {
    }//// D:\testing\OtherPackage\NewOuter.java ////package OtherPackage;
    import SomePackage.* ;
    public class NewOuter extends Outer {
        public NewOuter(int xx) {
            super(xx) ;
        public class NewInner extends Outer.Inner {
            public int getIt() {
                return x ;
    }//// D:\testings\Test.java ////import OtherPackage.* ;
    import java.awt.* ;
    import java.applet.* ;
    public class Test extends Applet {
        public void init () {
            initComponents ();
        private void initComponents() {
            add(new Label("x = ")) ;
            int myx = new NewOuter(3288).new NewInner().getIt() ;
            TextField xfld = new TextField() ;
            xfld.setEditable(false) ;
            xfld.setText(Integer.toString(myx)) ;
            add(xfld) ;
    }//// d:\testing\build.cmd ////set classpath=.;D:\testing
    cd \testing\SomePackage
    javac Outer.java
    cd ..\OtherPackage
    javac NewOuter.java
    cd ..
    javac Test.java//// d:\testing\Test.html ////<HTML><HEAD></HEAD><BODY>
    <APPLET CODE="Test.class" CODEBASE="." WIDTH=200 HEIGHT=100></APPLET>
    </BODY></HTML>

  • Problem with final variables and inner classes

    variables accessed by inner classes need to be final. Else it gives compilation error. Such clases work finw from prompt. But when I try to run such classes through webstart it gives me error/exception for those final variables being accessed from inner class.
    Is there any solution to this?
    Exception is:
    java.lang.ClassFormatError: com/icorbroker/fx/client/screens/batchorder/BatchOrderFrame$2 (Illegal Variable name " val$l_table")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$1(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at com.icorbroker.fx.client.screens.batchorder.BatchOrderFrame.<init>(BatchOrderFrame.java:217)
         at com.icorbroker.fx.client.screens.batchorder.BatchOrderViewController.createView(BatchOrderViewController.java:150)
         at com.icorbroker.fx.client.screens.RealTimeViewController.initialize(RealTimeViewController.java:23)
         at com.icorbroker.fx.client.screens.batchorder.BatchOrderViewController.<init>(BatchOrderViewController.java:62)
         at com.icorbroker.fx.client.screens.displayelements.DisplayPanel$3.mousePressed(DisplayPanel.java:267)
         at java.awt.Component.processMouseEvent(Component.java:5131)
         at java.awt.Component.processEvent(Component.java:4931)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3639)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3480)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3162)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
         at java.awt.Container.dispatchEventImpl(Container.java:1609)
         at java.awt.Window.dispatchEventImpl(Window.java:1590)
         at java.awt.Component.dispatchEvent(Component.java:3480)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

    I've also been having the same problem. The only work-around seems to be to slightly change the code, recompile & hope it works. See http://forum.java.sun.com/thread.jsp?forum=38&thread=372291

  • Clarification about inner class - why use it?

    hi all
    i just have a request to get some clarification on inner class. why do we use it and is it common to use it? thanks.

    hi all
    i just have a request to get some clarification on
    inner class. why do we use it and is it common to use
    it? thanks.It is realtively common. You may use one if you need to implement a class that's only relevant to one other class, like a data container or EventListener. Since it's probably interlocking tightlyx with its "outer" class, but doesn't need to be in reach of any other classes, its visibility can be confined to the outer class itself. Plus, objects from inner classes - if not declared static - are always tied to the existance of an outer class instance.

  • Who can explain inner class to me?

    //InheritInner.java
    //Inheriting an inner class
    class WithInner
         class Inner{
              Inner()
              {System.out.println("Inner class");
         WithInner()
         {System.out.println("WithInner");}
    public class InheritInner extends WithInner.Inner
         //!InheritInner(){}//Won't compile
         InheritInner(WithInner wi)
              wi.super();
         public static void main(String[] args)
              WithInner wi=new WithInner();
              InheritInner ii=new InheritInner(wi);
    Who can explain this subclass constructor to me?
    I appreciate your help!

    Here's the class that in 'Thinking in Java'. For some reason, yours is completely different.
    //: InheritInner.java
    // Inheriting an inner class
    class WithInner {
      class Inner {}
    public class InheritInner
        extends WithInner.Inner {
      //! InheritInner() {} // Won't compile
      InheritInner(WithInner wi) {
        wi.super();
      public static void main(String[] args) {
        WithInner wi = new WithInner();
        InheritInner ii = new InheritInner(wi);

Maybe you are looking for

  • FM Radio Application for Windows 8

    I am trying to develop a simple FM Radio Application for Windows 8 phones. I found one class but it says it will not work for devices targeting windows 8. Can some one please help.  https://msdn.microsoft.com/en-us/library/windows/apps/microsoft.devi

  • EPM System Configurator  Error

    Hi, I am trying to open EPM System Configurator but getting error: "The Vital Product Data registry is in use by another installer. Please start this installer after the other installtion is complete." I am not installing the EPM system. It is alread

  • IPod loses all content when it is sync.

    For this past week when I would update my 30GB ipod it shows it updates but afterwards all contents are gone and it contains zero. Then when I plug it back in it lags the itunes store then says I have to restore it and download everything again. Some

  • Need an answer quickly...please

    Plugged in my iPod Mini to update (or sychronize) couple of songs I added via iTunes. When I was done....and the message came up "iPod sync complete...pressed the eject button. But... The iPod itself said "Do Not Disconnect." Waited a long time, abou

  • Can't boot with zfs root - Solaris 10 u6

    Having installed Solaris 10 u6 on one disk with native ufs and made this work by adding the the following entries /etc/driver_aliases glm pci1000,f /etc/path_to_inst <lang pci string for my scsi controller> glm which are needed since the driver selec