Base Class NI View Fails

Hi
I am currently trying to leverage of my existing codebase by creating a Base class View containing common functionality. My goal is to create the Base class in the form of a (MFC) CFormView with an associated dialog resource containing all my NI controls and underlying code. From there I intend to derive further View Classes based on the former. I have tried this and cannot seem to get the Base class to recognise its members,i.e the Ni controls, whilst the view displays fine and I can see all the Ni controls on form derived from the Base class I cannot execute any of the base class meber functions that need a reference to the Ni controls. If you could give me an example of a project that derives it view from a Base class with ActiveX contro
ls in it I would be very appreciative.....
Regards

I was going to investigate it a little before posting, but
I'm not sure I can go any further on my own.
I am using the Yahoo Astra Flash Components. When I add a
Tree component, and give it a dataProvider that does not use any
nested nodes, it gives me the error. If I use even 1 nested node,
then it works correctly.
I am assuming that the error is stemming from the Yahoo
Component somewhere, just need to run down what is causing it.

Similar Messages

  • SW6U2 (C++) wrong code with empty base class

    Consider this program:
    #include <assert.h>
    #include <new>
    struct Base1
    int i;
    struct Base2
    Base2()
    struct Derived : public Base1, public Base2
    int main( int, char** )
    int buf[2] = { 0x7F7F7F7F, 0x7F7F7F7F };
    assert( sizeof( Derived ) == 4 );
    new (buf) Derived;
    assert( buf[1] == 0x7F7F7F7F ); // <- failure
    The second assert fails, because the second (empty) base class Base2 is placed at offset 4 of Derived. But when the custom Base2 constructor runs it makes implicit something like
    memset( this, 0, sizeof( Base2) );
    sizeof( empty class ) is 1 and the offset of Base2 is 4. Effect is that the constructor writes to memory that is not owned by the whole object.
    This can produce some subtile memory errors.
    Joerg
    p.s. What is the right way to submit and view bugs for this C++ compiler?

    The forum posting software eats some C++ code. To get all the code displayed, you must use "code" brackets, and leave a space after each "<" and before each ">".
    I assume your two include statements are these:#include < assert.h >
    #include < new > and that the rest of the code displayed correctly.
    Under those assumptions, I cannot duplicate the bug using the initial release of C++ 5.3, nor with the latest patch. Please be sure the code you post actually shows the problem, and use the "preview" button to see that the code displays correctly.
    If you still see the bug with the code you posted, please run this command
    CC -V -c foobar.cc
    and tell me what output you get. The file foobar.cc does not need to exist.

  • Linkage Class / Base Class conflict?

    I'm trying to create Flash components for Flex. Part of that
    is linking the library entry for a movie clip to the class
    definition of it. In this case, it's a simple blue square that I'm
    trying to link to view.BlueSquare which extends
    mx.core.UIMovieClip. It finds the class successfully, but I am
    unable to close the dialog box because I get an alert warning me
    that the base class will not be used as I click the OK button. The
    only way I am able to close the dialog box is if I do not enter the
    name of an existing class file in the "Class" field. This is very
    frustrating... what am I doing wrong?

    io.class is an obfuscated class and some of the Eclipse tools don&#39;t work well with them. For example, using control-shift-T to see the list of classes won&#39;t find com.businessobjects.lang.cal.compiler.io nor com.businessobjects.lang.cal.compiler.ip for that matter, but you can browse to these classes in the package explorer and see them in the calPlatform.jar. However, any api class (as documented in our public Javadoc) should be accessible. Does this answer your question, or do you have a more specific problem? Reproduction steps in Eclipse would work best for us since that&#39;s what we&#39;re using.  <p> Bo </p>

  • Export for AS: Class vs Base Class

    when i export a movie clip for actionscript, what are the differences between Class & Base Class?  i see most tutorials change Base Class and leave Class as the name of the movie clip defined in the library.

    the main use of the base class is to extend it so many different classes can share it's functionality.
    but even when not needed as a super class, the base class is also helpful when you want to instantiate many different objects using code and you don't want to write/compile many different class files.
    if flash finds you failed to write a class file (for every class exported for actionscript), flash writes a default class files for you.

  • Generating base classes

    I've seen it hinted that generating the base class of an annotated class is possible--which insinuates there are multiple passes where the initial "extend FooGenerated" would fail with a class not found, then the processor sees Foo, generates "FooGenerated", and then the compiler retries compiling Foo with the now-present FooGenerated.
    I can't get this to work--I'm not trying base classes, just a "Blah" dummy class.
    Here is my annotation processor:
    http://github.com/stephenh/bindgen/tree/master/src/main/org/exigencecorp/bindgen/Bindgen.java
    And an example class with my annotation that references my dummy "Blah" class:
    http://github.com/stephenh/bindgen/tree/master/src/example/org/exigencecorp/bindgen/example/Employee.java
    But compiling this (with "ant jar compile-example") gives:
    http://gist.github.com/42294
    Blah.java shows up in "bin/example" (the output path of the ant javac task), but no Blah.class, nor any other .class files, which is kind of weird.
    The build.xml is pretty simple, I think:
    http://github.com/stephenh/bindgen/tree/master/build.xml
    Is there something I'm missing to get this "users classes depending on generated classes" behavior to work?
    Thanks.

    Nevermind, this works if "FooGenerated" is in the same package as "Foo". I was trying to start with small steps and so started with the root package. I was too focused on the annotation processing details to overlook the obvious "this wouldn't even work in regular Java".

  • Quite simple Question about ViewObject base classes

    Hi there;
    When we have an unfinished project with some viewsObjects created and then we change the project  viewObject base class in project properties, does old viewsObjects will be assumed to the new class ?
    Only the new viewObjects will be automatically assume the new base class ? or we will need to create java source to all the views we want to ?
    Thanks;
    Marcos Ortega;
    Brazil

    Marcos,
    Only newly created objects will assume the new base class. Old ones will not be changed. If you want to change the old ones, you can edit the Java files by hand and change the "extends."
    John

  • AS3: How to create one base class for classes loaded in multiple swfs?

    Our application have 3 different modules and all use
    fscommand and ExternalInterface alot. Now the problem is we are
    combining all those modules, but they all will reside in different
    swfs. Is there any way that they extend to same base class and its
    static members have only one instance accessible by all
    three?

    Hi,
    You can achieve this via Workshop 9.2 by using the exported Ant script for your project as follows:
    -Ensure that all Jars needed to resolve com.bea.p13n.property.EntityPropertyManager (this particular class is found in weblogic92/common/p13n/lib/p13n_ejb.jar) and all referenced classes are added to the Java build path for your WebLogic EJB project (Properties->Java Build Path->Libraries)
    -Export the "Workshop Ant Script" for your WebLogic EJB project (File->Export->Workshop Ant Script); this will generate a "build.xml" Ant script under your project root directory.
    -Edit this default build script as follows: in the call to the "ejbgen" task within the "build" target, add the attribute: propertyFile="ejbgen.properties"
    -Create a file "ejbgen.properties" under the root of your WebLogic EJB project and add the following entry:
    YourSessionBeanClassName.remote.baseClass=com.bea.p13n.property.EntityPropertyManager
    -Add a "<path refid="java.classpath"/>" within the "<classpath>" for the "java" task element that calls "weblogic.ejbc" (this will ensure that the p13n classes are resolved by EJBC)
    Follow the instructions for executing the Ant build script found here: http://edocs.bea.com/workshop/docs92/ws_platform/ideuserguide/conUseCustomAntBuild.html
    For more information on the EJBGen property file support, see: http://e-docs.bea.com/wls/docs92/ejb/EJBGen_reference.html

  • Warning :: Derived class hides the base class virtual function

    We are porting from CC5.3 to CC5.8 compiler with Sun Studio one compiler. After plenty of hurdles we are in the final stage of removing the warning messages... Amoung the plenty the following one is very common and in different files. Why am I getting this error in 5.8 and not in 5.3 compiler....
    Warning: derived_Object::markRead Hides the virtual function base_Object::markRead(ut_SourceCodeLocation&) const in a virtual base
    From this it is easily understandable that the base class mark read was hidden by derived class markRead... when we drive and override the derived class function.... It is all over the place....
    Thank you,
    Saravanan Kannan
    //public: using xx_Object :: markRead;
    virtual void markRead() const;

    The Sun C++ FAQ discusses the warning message:
    http://developers.sun.com/prodtech/cc/documentation/ss11/mr/READMEs/c++_faq.html#Coding1
    Notice that warnings are not necessarily errors. But I applaud your desire to fix the code so that it generates no warnings. I wish more of our customers could be persuaded to do the same. :-)
    C++ 5.3 issues this warning, by the way. Example:
    struct B { virtual int foo(int); };
    struct D : B { virtual int foo(double); }; // line 2
    D d;
    line 2: Warning: D::foo hides the virtual function B::foo(int).
    If for your particular code you do not see a warning with C++ 5.3, it would be due to a bug in C++ 5.3 that was later fixed.

  • Crystal Report Viewer fails for browser versions =10

    We're using the Crystal Reports for VS2010 SP2 and get the following error when trying to generate a report in Firefox 10.0.2 and Chrome 18.0.1025.11 beta-m:
    [NullReferenceException: Object reference not set to an instance of an object.]
       CrystalDecisions.Web.ViewerGlobal.get_IsNetscape6Up() +88
       CrystalDecisions.Web.CrystalReportViewer.Render(HtmlTextWriter output) +83
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
       ASP.app_filters_reportviewer_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\qfmui\10eb2bd5\d0d0d3a5\App_Web_e2fg2prg.2.cs:0
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
       System.Web.UI.Page.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
    If I change the user agent string in Firefox to that of Firefox 7.0.1 everything works as expected, this implies there is some logic in get_IsNetscape6Up() which is failing because the major browser version as reported by the user agent string is two digits instead of one.
    We encountered a similar issue for our legacy pages containing Infragistics 2007 controls but were able to fix that by overriding the System.Web.Configuration.HttpCapabilitiesBase.BrowserCapabilitiesProvider and faking the browser version to 9.80.  Crystal Report Viewer is apparently not using .Net's built in HttpBrowserCapabilities object, is there anything else I can adjust to stop the viewer failing?

    hello Robert
    Today must be my day. I already got a reply from PM (normally it takes a "bit" longer...). Anyhow, here is what he said:
    With Firefoxu2019s release cycles, I donu2019t think weu2019ll be able to officially support the latest versions
    of Firefox at every service release.  We do our best to test the released versions of Firefox
    that align with our releases.  I donu2019t know the details but Iu2019ve heard there is a plan in place where
    the support team(s) (?) will test the most recent releases of Firefox with whatu2019s currently
    shipping by SAP and log bugs as necessary.
    (umm, this is my - Ludek note here ) -> news to me re. support doing QA... find out something new every day. Anyhow, continuation of the message from PM:
    The current plan for CR for VS2010, the SP3 release (expected in April) will support up to
    Firefox 9.  If there are reproducible bugs in Firefox 10 (or higher), then please enter a bug
    and escalate and it will be investigated for the next available release.
    I'll revisit this once SP3 is out there and do an escalation for Firefox 10 - ok?
    - Ludek

  • Class override, how to create the child class and then the base class

    I started to write a program for a smart DMM, the problem is every version of the DMM the company change the communication commend.
    My idea is to write a child class for every DMM version and every SubVI of the child will override the base class SubVI.
    My problem is, i want first to create one child class and after i will see every thing is work,  start to create the base class. that way i will see if am thinking the right way.
    My question is
    How can i create a child class and then create the base class and configure the SubVi of the child class to be Override of the base class?
    I tried to search in the property of the class but i didn't see nothing.
    Thanks
    Solved!
    Go to Solution.

    This can be done and I've done it on occasion.
    You simply create the base class with the dynamic dispatch methods you require (connector panes need to be identical to thos of the child class).
    Then set the inheritance of the class to inherit from this base class.  If your method is defined as a dynamic dispatch method in the parent, you'll most likely now have some errors (unless your child method was already DD in which case you might just be OK already).
    To change the inheritance of a class, right-click the properties of the class in your project and select properties.  I believe the ineritance tree is at the lower end of the properties.  Click on the "change inheritance" (or something similar) to choose the class from which you now wish to inherit.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • How to specify a base class for Remote Interface in Workshop 9.2? -- URGENT

    Hi,
    I am trying to create a UUP EJB in WebLogic 9.2 workshop. I am using @FileGeneration to create my home & remote interfaces. And the generated remote interface is extending javax.ejb.EJBObject;I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager which in turn implements javax.ejb.EJBObject. Can someone tell how i can do it in Workshop?.
    I came across Predefined Variable: remote.baseClass and as per docume
    ntation..."If specified, the value of this variable will be used as the base class for all generated remote classes. Where i should specify it?. @FileGeneration does nt have any option for it. Any help is grtly appreciated.
    Following are my code snippets:
    IMPL Class
    @FileGeneration(remoteClass = Constants.Bool.TRUE,remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE,remoteClassName = "MyEntityPropertyManager",remoteHomeName = "MyEntityPropertyManagerHome")
    public class MyEntityPropertyManagerImpl extends GenericSessionBean implements
              SessionBean {
    //code
    }

    This question was posted to both the bea.workshop.developer.general and weblogic.developer.interest.workshop (I had replied to the later on 10/19); after seeing an identical question today on this list want to include a reference to that reply here:
    http://forums.bea.com/bea/message.jspa?messageID=600044925&tstart=0
    -Rob

  • How to expose and code the event handlers of a base class?

    I have created a class that inherits NumericUpDown. When I instantiate an object from that class, I can make it visible and have it appear on my form just like any other NUD. How can I get that instantiated object to expose the event handlers of its base
    class, the NUD in this case, so that, for example, I can tell the client what action to take when the value of the instantiated object changes?
    Thanks for your help.

    I am not sure exactly what you mean.  Are you adding your NUD controls to the Form at design time from the toolbox or adding them in code at run time?  If you are adding them to the form from the toolbox then you access the events the same way
    you would a standart NUD control.   If it is at runtime and you have a fixed amount of them you are going to add then you can declare them Class Scoped using the
    WithEvents keyword which will let you access all their events.
    Public Class Form1
    Private WithEvents Nud1 As New NUD
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Controls.Add(Nud1)
    End Sub
    Private Sub Nud1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Nud1.ValueChanged
    Me.Text = Nud1.Value.ToString
    End Sub
    End Class
    Public Class NUD
    Inherits NumericUpDown
    'Your custom code to make it work how you want...
    End Class
     If this is not what you are doing then you may need to explain a bit more and show the code you are using so we understand better.
    If you say it can`t be done then i`ll try it

  • Comparison of SAP R/3 4.7 with SAP ERP 6.0 in Basis point of view

    Hi Experts,
    Can we compare R/3 4.7 and ECC 6.0 in Basis point of view.
    Say for example Password is case sensitive in new version, DBACOCKPIT added for central maintenance of database.
    Like this can we list out some of the changes or differences.
    It will be more helpful
    Regards
    KT

    Hi,
    compare to 4.7
    1.New ABAP editor added like if u write code  in abap editor ,using if coditions and select statments it automatically shows the link endif,  like if .. endif,select ...endselect.
    2.New abap debugger compare to the classic debugger.
    3.DBACOCKPIT
       Missing indexes of various database tablesu2019 and the transaction to reactivate all the missing indexes  is u2018DBACOCKPITu2019. Below is the screenshot of the transaction DBACOCKPIT.
    Regards,
    Madhu

  • Error with instance variable and constructor of base class

    I am getting the error on the following statement "protected Point apoint" of by base class. What is causing this problem? See my code:
    package Shapes;
    public abstract class Shapes
         protected Point apoint; / ****error at this line****/
         public void move(double xdelta, double ydelta)
              apoint.x += xdelta;
              apoint.y += ydelta;
    public abstract void distance();
    public abstract void show();
    public String toString()
    return "\nThe starting point is at coordinates ("+x+","+y+")";
    package Shapes;
    public class Lines extends Shapes
    protected Point start;
    protected Point end;
         protected double x;
         protected double y;
         double delta;
         public Lines( final Point apoint, final Point bpoint)
    start.x = apoint.x;
              start.y = apoint.y;
              end.x = bpoint.x;
              end.y = bpoint.y;
    public Lines(double xstart, double ystart, double xend, double yend)
    this.xstart = xstart;
              this.ystart = ystart;
              this.xend = xend;
              this.yend = yend;
         public Lines(double x, double y)
              this.x = x;
              this.y = y;
                   public void distance(final Lines start, final Lines end)
                        delta = abs(Math.sqrt (super.x - start.x) * (super.x - end.x) +
                        (super.y - start.y) * (super.y - end.y));
                   Lines move(Point start, double delta)
                        end.x += delta;
                        end.y += delta;
                        return new Point(end);
    public Lines show()
    g.drawLine( start.x, start.y, end.x, end.y);
    public String toString()
    return super.toString()+ "\n moved distance is("
                   + start + ") : (" + end + ")"
                   +" \n to position(" + start + " ) : (" + end + ")";
    package Shapes;
    public class Rectangle extends Lines
         double delta;
    public Rectangle (Point top_lft_pt, Point bottom_rght_pt)
    super(top_lft_pt, bottom_rght_pt);
    public Rectangle(double x_top_lft, double y_top_lft, double x_bottom_rght, double y_bottom_rght)
    super(x_top_lft, y_top_lft, x_bottom_rght, y_bottom_rght);
         public Rectantgle is_it_diagonal()
              if(top_lft.x > bottom_rght.x && bottom_rght.x < top_lft.x)
                   System.out.println("Point are Not Diagonal");
                   public void distance(double delta)
                        delta = abs(Math.sqrt (top_lft.x - bottom_rght.x) * (top_lft.x - botton_rght.x) +
                        (top_lft.y - bottom_rght.y) * (top_lft.y - bottom_rght.y));
                   public Rectangle move(final Point top_lft_pt, double delta)
                        bottom_rght.x += delta;
                        bottom_rght.y += delta;
                        return new Point(bottom_rght_pt);
                   public void get_top_rght_coords()
                        Point top_rght = new Point();
                        top_rght.x = bottom_rght.x;
                        top_rght.y = top_lft.y;
                   public void get_bottom_left_coords()
                        Point bottom_lft = new Point();
                        bottom_lft.x = top_lft.x;
                        bottom_lft.y = bottom_rght.y;
         public Rectangle show()
                        g.drawLine(top_lft.x, top_lft.y, top_rght_x, top_rght_y);
                        g.drawLine(bottom_lft.x, bottom_lft.y, bottom_rght.x, bottom_rght.y);
                        g.drawLine(top_lft.x, top_lft.y, bottom_lft.x, bottom_lft.y);
                        g.drawLine(top_rght.x, top_rght.y, bottom_rght.x, bottom_rght.y);
    package Shapes;
    public class Circles extends Lines
    protected double radius;
         public double delta;
         protected Point center;
    public Circles(double x, double y, double radians)
    super(x, y);
              radius = radians;
         public Circles(Point acenter)
              center.x = acenter.x;
              center.y = acenter.y;
    public void distance()
    delta = abs(Math.sqrt(super.x - x) * (super.x - x) + (super.y - y) * (super.y -y));
         public Circles move(final Point Circles, double delta)
              return new Point(Circles);
    public void show()
    g.drawOval(Circles.x, Circles.y, radius, radius);
    package Shapes;
    import java .math .*;
    import java.util .Random ;
    public class ShapesDriver
    Shapes[] aShape = new Shapes[10];
    static double range = 101.0;
    static Random r1 = new Random();
    public static void main(String [] args)
    double[][] coords = new double[10][10];
    double[] radians = new double [10];
    Shapes anyShape = {
    new Circles(radians),
    new Lines(coords),
    new Rectangle(coords)
    Shapes aShape; /***error at this line***/
              for(int i = 1; i <= coords.length; i++)
    for(int j = 1; j <= coords.length; j++)
                                                      coords[i][j] = r1.nextDouble () * range;
                                                      radians[j] = r1.nextDouble () * range;
    aShape[i] = anyShape[r1.nextInt(aShape.length)];
    System.exit(1);

    Thanks for your help with this problem. Now I have another problem that I am having a hard time figuring out. My program is using inheritance and polymorphism. I trying to use only one version of methods in the superclass points which extends the shapes class which is the abstract superclass vs. repeating the implementation of the methods (move, show, etc.) in each of the subclasses. The error I am getting is this "declare the class abstract, or implement abstract member 'Point Shapes.move()'. As you see, move is declared abstract and of type point in the Shapes superclass and it's behavior is implemented in the subclass Points extending Shapes. The other subclasses, circle, rectangle and lines will invoke the move method from Points and return a new point object. Why I am I getting the error to declare or implement move when the implementation is in Point?
    Below is code, please help?
    import java .awt .Point ;
    public class ShapesDriver
         public static void main(String args[])
              int count = 0;
              int choice;
              Point start = null;
              Point end = null;
              System.out .println(" 1 i am here");
              start = new Point((int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
              end = new Point((int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
         System.out .println(" 2 i am here");     
         System.out.println (start);
         System.out.println(end);                         
         for(int i = 0; i <= count; i++)
              System.out .println(" 3 i am here");
              choice = (int)(4.0 * Math.random());
              System.out .println(" 4 i am here");
              System.out.println (choice);     
         switch(choice)
              case 0: //Lines
              System.out .println(" 5 i am here");
              Lines apoint = new Lines((int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                                  (int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
              Point coords = new Point((int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0));
              new Point((int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0));
              break;
              case 1: //Circles
              System.out .println(" 6 i am here");
              Circles center = new Circles((double)(Math.random()* 10.0),
              (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
              (double)(Math.random()* 10.0),(double)(Math.random()* 10.0));
              Circles centerpt = new Circles((int)(Math.random()* 10.0),
              (int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
              (int)(Math.random()* 10.0), (double)(Math.random()* 10.0));
         break;
              case 2: //Rectangles
         System.out .println(" 7 i am here");
              Rectangle top_lft_pt = new Rectangle ((double)(Math.random()* 10.0),
                             (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
                             (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
                             (double)(Math.random()* 10.0));
              Rectangle bottom_rgt_pt = new Rectangle ((double)(Math.random()* 10.0),
                   (double)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0));
         break;
         default:
         System.out .println(" 9 i am here");
         System.out.println("\nInvalid shape choice =" + choice);
         System.exit(0);
         break;
         try
                   System.in.read();
                   catch(java.io.IOException ioe)
    import java .awt .Point ;
    public abstract class Shapes
         private String shape;
         public Shapes(String ashape)
              shape = new String(ashape);
         public abstract Point move();
         public double distance()
              return 0.0;
         public abstract void show();
         public String toString()
              return "\nThis shape is a" + shape;
    import java .awt .Point ;
    public class Rectangle extends Points
         protected Point top_lft;
         protected Point top_rgt;
         protected Point bottom_lft;
         protected double top_lft_x;
         protected double top_lft_y;
         protected double bottom_rgt_x;
         protected double bottom_rgt_y;
         protected Point bottom_rgt;
         protected double delta = 0;
         protected String shape = "Rectangle";
         public Rectangle(double x, double y, double top_lft_x,
                             double top_lft_y, double bottom_rgt_x,
                             double bottom_rgt_y)
              super(x, y);
              top_lft_x = top_lft_x;
              top_lft_y = top_lft_y;
              bottom_rgt_x = bottom_rgt_x;
              bottom_rgt_y = bottom_rgt_y;
         public Rectangle( double x, double y, Point bottom_rgt, Point top_lft)
              super(x, y);
              bottom_rgt_x = bottom_rgt.x;
              bottom_rgt_y = bottom_rgt.y;
              top_lft_x = top_lft.x;
              top_lft_y = top_lft.y;
         public String toString()
              return super.toString() + " coordinates top left= " + top_lft_x + "," + top_lft_y + "and bottom right" +
                   bottom_rgt_x + "," + bottom_rgt_y + ")";
         public void is_it_diagonal()
              if(top_lft_x < bottom_rgt_x && bottom_rgt_x > top_lft_x)
                   System.out.println("Points are Not Diagonal");
              public double distance()
                   distance ();
                   return delta;
              public Point move(Point top_lft)
                   move();
                   bottom_rgt_x += delta;
                   bottom_rgt_y += delta;
                   return top_lft;
              public void get_other_coords()
                   top_rgt.x = bottom_rgt.x;
              top_rgt.y = top_lft.y;
                   bottom_lft.x = top_lft.x;
                   bottom_lft.y = bottom_rgt.y;
              public void show()
                   super.show();
                   System.out.println("new coords are :");
                   System.out .println ("(" + top_lft_x + "," + top_lft_y + ")");
                   System.out .println ("top right(" + top_rgt + ")");
                   System.out .println ("(" + bottom_rgt_x + "," + bottom_rgt_y + ")");
                   System.out .println ("bottom right(" + bottom_rgt + ")");
    import java .awt .Point ;
    public class Points extends Shapes
         protected double delta = 0.0;
         protected double x;
         protected double y;
         protected String ashape = "Points";
         public Points( double x, double y)
              super("Points");
              x = x;
              y = y;
         public Points( Point start)
              super("Points");
              x = start.x;
              y = start.y;          
         public String toString()
              return super.toString() + "References coordinates(" + x + y + ")";
         public double distance(double x1, double y1 )
              return delta =(Math.sqrt(x - x1) * (x - x1) + (y - y1) *
              (y - y1));
         public Point move(Point pts)
              pts.x += delta;
              pts.y += delta;
              return pts;
         public void show()
              System.out.println("This shape is a" + ashape + "(" +
                                  "(" + x+ "," + y + ")");
    import java .awt .Point ;
    public class Lines extends Points
         double delta = 0;
         protected double x;
         protected double y;
         protected String ashape = "Lines";
         public Lines( double x1, double y1, double x, double y)
              super(x1,y1);
              x = x;
              y = y;
         public Lines(Point start, Point end)
              super(start);
              x = end.x;
              y = end.y;
         public String toString(Point end)
              return super.toString() + "line points = (" + x + "," + y +
                   "(" + end + ")";
         public double distance()
              distance ();
              return delta;
         public Point move(Point lines)
              move ();
              return lines;
         public void show()
              System.out.println("This shape is a" + ashape + "(" +
                                  "(" + x + "," + y + ")");
    import java .awt .Point ;
    public class Circles extends Points
    protected double radius;
    protected double xcenter;
    protected double ycenter;
    protected String ashape = "Circle";
         public Circles( double x, double y, double cx, double cy, double radians)
              super(x, y);
              xcenter = cx;
              ycenter = cy;
              radius = radians;
         public Circles( Point acenter, Point ref, double radians)
              super(ref);
              xcenter = acenter.x;
              ycenter = acenter.y;
              radius = radians;
         public String toString(Point ref)
              return super.toString() + " reference points (" +
                   ref + ")" +
                   "center coordinates (" + xcenter + "," + ycenter + ")";
              public double distance(Point ref)
                   return (Math.sqrt(ref.x - xcenter) * (ref.x - xcenter)
                             + (ref.y - ycenter) *
              (ref.y - ycenter));
              public Point move(Point center)
                   move();
                   return center;
              public void show()
                   System.out.println("This shape is a" + ashape + "(" +
                                  "(" + xcenter + "," + ycenter + ")");

  • How to call derived class to base class

    Hello everybody,
    I create a GUi application in java swing. Now i want to navigate between the screen but the timing between the screen is very slow bcoz i imported the class from package to another package. Now i want to extends one package to another package to reduce the navigation time but it saying error bcoz i cant able to call my derived class to base class. if anyone know the answer for this please answer this immediately.
    If any other method is there to optimise the navigation time please tell me
    by
    (kamal)

    Sorry, I've got major difficulties understanding your query:
    I create a GUi application in java
    ication in java swing. ok
    Now i want to navigate between
    the screenwhat? switch screens? display a different dialog?
    but the timing between the screen is very
    slowtiming? do you mean the time it takes to display a different dialog?
    bcoz i imported the class from package to
    another package.how did you come to the conclusion that that is the reason for the slowness? Did you do any profiling or is this just guess-work?

Maybe you are looking for

  • Macbook Pro Early 2009 Randomly Sleeps / Black Screen While In use

    My macbook pro Early 2009, randomly goes to sleep while I am using the computer, I first noticed it occuring while I was using the mini display adapter to a computer monitor, and using a second monitor and watching a movie, the screen would go blank

  • Ipod will sink to my computer but not another computer, ipod will sink to my computer but not another computer

    Today i added some shows and it compleatly deleated my playlists.. they were from my brothers library the songs..but now it will not sink to his computer. but it will to mine. i tride reseting it, and nothing.

  • How to use Master Data Attribute of in Update Rule's Formula

    Hi experts. In update rule, there is an option to use <b>Master Data Attribute of</b>. However, due to user requirement, I need to use that in <b>Formula</b> instead. <b>Field to update:</b> Profit Center <b>Logic:</b> If Cost Center is empty Then Pr

  • Auto upgrade jre and auto retain java.policy

    Hello, I need to automatically update clients with jre 1.4.2_07 and also retain the existing java.policy from the previous version (1.4.2_04). I have the jre installation kicking off correctly (with IE and XP) using codebase = "http://myserver/jinsta

  • Cs6 updates error

    When I have been trying to install cs6 updates I have been getti g the same error for the past month, have tried over 50 times.  See below errors. Adobe Photoshop 13.0.6 There was an error downloading this update. Please quit and try again later. Err