Hi, new to 3D, doubt in importing class

hi all,
i m new to JAVA 3D, i currrently hv a simple example source which i try to compile it, it just can't, saying that class not found, but i m sure i hv download and install the JAVA 3D for DirectX 1.3.1, also i hv the following code
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Label;
import java.awt.GraphicsConfiguration;
// below having importing class problem
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.universe.*;
import com.sun.j3d.utils.geometry.*;
import javax.media.j3d.*;
import javax.vecmath.*;can anyone guide me, thank you

That is the way I understand it. Here is the information from the documentation.
The version of the Export utility must be equal to the version of either the source or target database, whichever is earlier.
For example, to create an export file for an import into a later release database, use a version of the Export utility that equals the source database. Conversely, to create an export file for an import into an earlier release database, use a version of the Export utility that equals the version of the target database.
In general, you can use the Export utility from any Oracle8 release to export from an Oracle9i server and create an Oracle8 export file.
Then further down is this handy table:
Table 21-5 Using Different Releases of Export and Import
Export from Import to Use Export Release Use Import Release
10.1.0 9.0.2 9.0.2 9.0.2
So, that is the way I understand this. I have not done this, but this is how I undertand it to work.
Please correct me if I am wrong.
Thanks
Dean

Similar Messages

  • New syntax to import .class Files???

    Using JDK 1.2.2 i coul import my own class files by typing
    import ClassName;
    Using the j2sdk1.4.0 compile I get the Error Message
    `.` expected
    Is there a new synatx for importing .class files???

    Normally I don't help anyone under this username, but since the idiot Kayaman is here being his usual jerk-ness providing no meaningful help whatsoever (as usual), I'll let you in on the fact that 1.4 doesn't let you import un-packaged classes anymore. So just remove the import statement, or change your imported class into some kind of package.

  • Importing Class

    I was reading the tutorial on importing class's. This is what
    I read
    Importing classes
    To reference a class in another script, you must prefix the
    class name with the class's package path. The combination of a
    class's name and its package path is the class's fully qualified
    class name. If a class resides in a top-level classpath
    directory--not in a subdirectory in the classpath directory--then
    its fully qualified class name is its class name.
    To specify package paths, use dot (.) notation to separate
    package directory names. Package paths are hierarchical, where each
    dot represents a nested directory. For example, suppose you create
    a class named Data that resides in a com/xyzzycorporation/ package
    in your classpath. To create an instance of that class, you could
    specify the fully qualified class name, as shown in the following
    example:
    var dataInstance = new com.xyzzycorporation.Data();
    My Question is about com/xyzzycorporation/ . would the full
    class parth be c:/com/xyzzycorporation/ . Why do they never state
    the drive letter when teaching about directories.

    Because there is no need. you don't need to reference the
    drive letter.
    Here's the basic jist of what they are saying....
    Single Class File...
    If you create your own custom class and want to use it in
    your flash file, save it into the same directory as the fla file
    and call the classes constructor. By default flash will look inside
    the folder where the fla resides in for the class files if it
    cannot find it inside the default directory.
    Multiple Class Files - 1 Project (often referred to as
    packages)
    Use your qualified domain name but backwards.....
    my domain is www.sd-dezign.com so if I was going to include a
    package of utility class files in my document I would do the
    following
    Create a folder in the same folder with my fla name it com
    and inside that a folder called sddezign and inside that utils and
    all my as files would be in there...the folder structure might look
    like this....
    myfile.fla
    com
    >sddezign
    >>utils
    >>>box.as
    >>>circle.as
    To call the constructor for each class, I have two options.
    The first which is by far the easiest looks like this
    In whatever frame you need to call that class constructor
    include "com.sddezign.utils.*";
    var myBox:Box = new Box();
    The second method requires more typing and can get tedious
    var myBox = new com.sddezign.utils.Box();
    Hope this helps you a bit better.

  • Problem importing classes and beans

    Hey there. Im having one major fustrating problem! When I code supporting classes and beans for my JSPs I get a code 500 internal server error when trying to import (via <%@ page import="class" %> and <jsp:useBean/>) Im storing my classes and beans in the WEB-INF folder and the calling JSPs are located in /ROOT/tests/8/jsp.jsp. Im using the following to import a class or bean:
    <%@ import="aClass" %>
    Seen as tho its in the WEB-INF folder I won't have to explicitly refer to where the class is located, just the class name.
    I never had this problem when I was using my hosting service. Its only on my localhost server in which I get the Internal Server error.
    Help appreciated, thx.
    PS: Im quite new to JSP/Java Servlet.

    import (via <%@ page import="class" %> and
    <jsp:useBean/>) Im storing my classes and beans in the
    WEB-INF folder try put your class file in WEB-INF/classes.
    or first put bean in the package, like WEB-INF/classes/packagename/beanclass
    in jsp page:
    <jsp:useBean id="Mybean" class="packagename.beanclass" scope="request" />
    Question: is /ROOT a context entry in your server.xml?
    Which JSP Container (version) you use? Maybe your localhost server's set up is different with your hosting.

  • Doubt in inner classes

    public class Outer
               public static void main(String argv[])
                         Outer o=new Outer(); //1                    
                         Inner i =o.new Inner(); //2
                         //Inner i =new Inner();  //3
         i.showName();   
             public      class Inner{   
                    void showName()
            System.out.println("hi");            
          }//End of Inner class
    }I have few doubt regrd the above program..
    1)when i create an inner class instance as in line 3,..Iam having an err like
    non-static variable this cannot be referenced from a static context.. Bcas Inner is a non static member of class Outer it cant be referred without an instance of Outer as in line 2.. But my doubt is why it doesnt give such error (of static context issue) in the case of line 1...its a silly dbt but iam confused ...
    2..Can we refer the inner class without outer class like in line 2., I have used
    Inner without Outer ..is this ok... or shuld we use as
    Outer.Inner i =o.new Inner(); //2
    3)In the above line We r associating the instance of inner class with the instance of outer class and the type of inner class with the type of outer class (Outer.Inner )..wht does this mean..
    can anyone pls help me understand this..
    thnx.
    mysha..

    public class Outer
    public static void main(String argv[])
    Outer o=new Outer(); //1
    er o=new Outer(); //1                    
    Inner i =o.new Inner(); //2
    //Inner i =new Inner();  //3
         i.showName();   
    public      class Inner{   
    void showName()
            System.out.println("hi");            
    }//End of Inner class
    }I have few doubt regrd the above program..
    1)when i create an inner class instance as in line
    3,..Iam having an err like
    non-static variable this cannot be referenced from a
    static context.. Bcas Inner is a non static member of
    class Outer it cant be referred without an instance
    of Outer as in line 2.. But my doubt is why it doesnt
    give such error (of static context issue) in the case
    of line 1...its a silly dbt but iam confused ...
    Static methods of a class exist as soon as Java loads the class. Regular, or non-static, methods of a class belong to an object and only come into existence after you create an object of the class. Regular methods are called by an object. Static members are called using the class name.
    Now, examine this simple program:
    class Apple
         private String color;
         public Apple(String color)
              this.color = color;
         public void show()
              System.out.println("apple color: " + color);
         public static void greeting()
              System.out.println("Hello from the Apple class.");
    public class  Demo
         public static void main(String[] args)
              Apple.greeting();  //1
              Apple a = new Apple("red");  //2
    }After the Apple class loads, any static methods in the class exist. Since greeting() is a static method of the Apple class, it can be called in line 1 before any Apple objects exist. But, what about line 2? How can the Apple constructor with the String parameter, which is a method in the Apple class, be called? The constructor isn't declared as a static, so it shouldn't exist in that regard, and no objects of the class exist. So, when and how did the constructor come into existence. That seems to be the question you're struggling with. I think the answer is: a constructor sort of acts like a static method. In order to be able to call a constructor, the constructor must exist as soon as the class loads and before any objects exist. The result is, you can call a constructor at any time.
    I think your example is similar to my example, but you only have one class:
    public class Outer
    public static void main(String argv[])
    Outer o=new Outer(); //1
    }After Java loads Outer, any static methods in Outer exist. Since main() is a static method, it exists. Subsequently, java calls the static main() method to begin execution of your program. In line 1, you call the default constructor for Outer. The default constructor isn't static, so it shouldn't exist, but just like the constructor in my example above, the default constructor acts like a static method, and therefore you can call it without getting an error.
    Inner i =o.new Inner(); //2
    2..Can we refer the inner class without outer class
    like in line 2., I have used
    Inner without Outer ..is this ok... or shuld we use
    as
    Outer.Inner i =o.new Inner(); //2
    I'm not sure what the difference is. In both cases you end up with an object that was created with the expression:
    o.new Inner()
    you just have a different type for your object, i.e. Outer.Inner versus Inner.
    3)In the above line We r associating the instance of
    inner class with the instance of outer class and the
    type of inner class with the type of outer class
    (Outer.Inner )..wht does this mean..
    can anyone pls help me understand this..
    I think you said it: it means you have an Inner object that is "associated" with an Outer object. Like any other regular member in the Outer class, Inner can refer to any members of Outer. (A static member of Outer can't refer to regular members of Outer because static members exist before any objects exist, and when no objects exist, the regular members don't exist.) That means an Outer object must exist before you can create an Inner object.

  • How to import class?

    Hi,
    I have one colourfullfirework is a FLA file and Documnet is a AS file,
    I want to import document class in FLA,
    How can i do this??
    Plz help me
    Thanks,
    JaxNa

    in Documnet class follwoing this script
    package
        import flash.events.MouseEvent;   
        import flash.system.ApplicationDomain;   
        import flash.events.Event;   
        import flash.display.MovieClip;   
        import com.shinedraw.effects.ColorfulFireworks;  
        public class Document extends MovieClip{
            private var _colorfulFireworks : ColorfulFireworks;
            public function Document(){
                this.addEventListener(Event.ADDED_TO_STAGE, on_added_to_stage);
            private function on_added_to_stage(e : Event):void{
                _colorfulFireworks = new ColorfulFireworks();
                addChild(_colorfulFireworks);
                var coverClass : Class = ApplicationDomain.currentDomain.getDefinition("Cover") as Class;
                var cover : MovieClip = new coverClass();
                addChild(cover);
                cover.addEventListener(MouseEvent.MOUSE_OVER, on_cover_click);
            private function on_cover_click(e:MouseEvent):void{
                var cover:MovieClip = e.target as MovieClip;
                removeChild(cover);
                _colorfulFireworks.start();
    when i import this Document in fla file  then its not working,
    and when i creat in Document class
    package {
        public class Document {
            public function Document(){
                trace("called");
    then its trace as called.
    so what can i do?
    Thanks
    JaxNa

  • Importing Class Objects created in IFS Manager into a JSP page

    I create a class object using IFS Manager which consisted of extended attributes. I hope this is the right thing to do when I want to manage some extra attributes of a DOCUMENT. But the question is what package do I import to access this newly create Class Object

    Thank you. The information was very helpful.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Joyce Peng:
    I believe you created a subclass of Document using iFS manager.
    Your new subclass is like any other class object in iFS.
    Here is an example of how to access a custom class EXPENSEREPORT with a custom attribute APPROVER.
    //Gets the the collection of all the class objects.
    //Then gets the specific EXPENSEREPORT class object.
    Collection classObjectCollection = session.getClassObjectCollection();
    ClassObject expenseReportClassObject =
    (ClassObject) classObjectCollection.getItems("EXPENSEREPORT");
    //Gets the APPROVER attribute for the class object.
    Attribute attribute = expenseReportClassObject.getEffectiveClassAttributes("APPROVER");
    <HR></BLOCKQUOTE>
    null

  • Cannot import classes

    I have one class calling another, like this:
    import CloseWindowListener;
    import DatabaseSearchControls;
    import java.awt.event.*;
    public class DatabaseSearch {
         public static void main (String[] args) {
              DatabaseSearchControls frame = new DatabaseSearchControls();
              frame.addWindowListener ( new CloseWindowListener() );
              frame.show();
    I get these errors when I compile DatabaseSearch:
    C:\Documents and Settings\Korbel\My Documents\benmay\DatabaseSearch.java:9: '.' expected
    import CloseWindowListener;
    ^
    C:\Documents and Settings\Korbel\My Documents\benmay\DatabaseSearch.java:10: '.' expected
    import DatabaseSearchControls;
    The other 2 files complied correctly and are in the same directory. Anyone ever seen this and know what I am doing wrong?
    Thank you!

    Are you compiling with version 1.4? If so, it is now invalid to import classes that don't belong to a package. It is not necessary to do so anyway, so just remove the import statements. Better yet, follow the Java standard and put each class you write into a named package, using the package statement.

  • New to java, having trouble with classes

    I am new to java and I am having problems importing classes in my first program, please help

    hi
    please tell, what`s your problem exatly?

  • Importing classes confusion AS3

    I must admit, I don't know Actionscript 3.0 extremely well but I know my way around it and am able to get by as a designer.
    I'm just wondering if classes should ALWAYS be imported. The reason I ask is because sometimes I don't import classes but my Actionscript still works without any problems.
    Just wondering if anyone could shed some light on this please?
    Thanks

    Are you using custom classes? If so then all of the ones you use will be required.
    So suppose you have in your code:
    var myInstance:SomeClass = new SomeClass();
    Then at the top you should add
    import com.mydomain.somePackage.SomeClass;
    Or if you are using packages like TweenLite or such. Even if you have added that to your classpath and it works without the import statement, it would be a surprise if you move it to another machine that doesn't have that installed.
    And of course the best way to find out is to have a problem where something goes wrong. That is really all that separates the noobs from the "pros" -- we have made a lot more mistakes than you've even thought of yet!

  • Importing classes... HELP!!!

    I'm using JBuilder Enterprise Edition...
    I open a .java file to edit and recompile to test my edit...
    However I keep getting errors that classes imported in the ,java file do not exist...
    I know they do, because I copied them locally to the folder where all the filess I need are located...
    The .java files that compile into .class files are read-only (there are over 100 of them)
    I've pulled them from a server to my local machine...
    Even if I check them out in Visual Source Safe, I still get errors that the imported classes in the source code do not exist...
    how do I fix this issue?

    Looks like I had a copy of JBuilder installed after all. So I selected Project-> Project Properties select the Paths tab then the Required Libraries tab (lower tab), hit the add button, then hit the new button. Fill in the library name and select project to hold the library. Then search your disk for the jar or the directory that contains your classes. Then hit OK a few times.

  • Importing classes in Jsdk 1.4.2

    Hi,
    I have two swing applications that run perfectly well when compiled and run. But then I am trying to include these two programs as two tabbed panes in a third program.
    I try to import classes from the other two programs using a simple import statement. But when I compile it the compiler return an error statement.
    I tried putting a package line in both the programs and tried importing it as a package in the third one and it says invalid package name.
    Can anybody help.
    Thanks in advance.

    OK here is the code. This is a example code from the book Java2 from scratch
    First file
    PortfoilioTotalsPanel.java
    // Import the packages used by this class
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    // PortfolioTotalsPanel Class
    public class PortfolioTotalsPanel extends JPanel
    // Define the dark green color
    public final static Color darkGreen = new Color( 0, 150, 40 );
    // Create our labels
    JLabel lblDollarChange = new JLabel( "Dollar Change:", JLabel.CENTER );
    JLabel lblPercentChange = new JLabel( "Percent Change:", JLabel.CENTER );
    // Constructor
    public PortfolioTotalsPanel()
    // Set the layout manager
    setLayout( new GridLayout( 2, 1 ) );
    // Add the labels to the JPanel
    add( lblDollarChange );
    add( lblPercentChange );
    // setDollarChange( fDollarChange )
    // Set the Dollar Change label to the dollar amount in fDollarChange
    public void setDollarChange( Float fDollarChange )
    // Set color based off of value
    if( fDollarChange.floatValue() > 0 )
    // Green for positive
    lblDollarChange.setForeground( darkGreen );
    else if( fDollarChange.floatValue() < 0 )
    // Red for negative
    lblDollarChange.setForeground( Color.red );
    else
    // Black for no change
    lblDollarChange.setForeground( Color.black );
    // Set the label text
    lblDollarChange.setText( "Dollar Change: $" + fDollarChange.toString() );
    // setPercentChange( fPercentChange )
    // Set the Percent Change label to the percent in fDollarChange
    public void setPercentChange( Float fPercentChange )
    // Set color based off of value
    if( fPercentChange.floatValue() > 0 )
    // Green for positive
    lblPercentChange.setForeground( darkGreen );
    else if( fPercentChange.floatValue() < 0 )
    // Red for negative
    lblPercentChange.setForeground( Color.red );
    else
    // Black for no change
    lblPercentChange.setForeground( Color.black );
    // Set the label text
    lblPercentChange.setText( "Percent Change: " + fPercentChange.toString() + "%" );
    // Main application entry point into this class
    public static void main( String[] args )
    // Create a JFrame object
    JFrame frame = new JFrame( "Portfolio Totals" );
    // Create an PortfolioTotalsPanel Object
    PortfolioTotalsPanel app = new PortfolioTotalsPanel();
    // Set the values of the labels
    app.setDollarChange( new Float( "-150.50" ) );
    app.setPercentChange( new Float( "15" ) );
    // Add our PortfolioTotalsPanel Object to the JFrame
    frame.getContentPane().add( app, BorderLayout.CENTER );
    // Resize our JFrame
    frame.setSize( 600, 100 );
    // Make our JFrame visible
    frame.setVisible( true );
    // Create a window listener to close our application when we
    // close our application
    frame.addWindowListener
         new WindowAdapter()
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    Second Program
    // ===========================================================================
    // File: StockTablePanel.java
    // Description: Sample file for Java 2 From Scratch
    // ===========================================================================
    // Import the libraries this application will use
    import javax.swing.JTable;
    import javax.swing.table.*;
    import javax.swing.JScrollPane;
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import java.awt.*;
    import java.awt.event.*;
    // Main application class: StockTablePanel
    public class StockTablePanel extends JPanel
    // Create a new Stock Table Model object
    StockTableModel stockTableModel = new StockTableModel();
    // Create a new JTable and associate it with the StockTableModel
    JTable stockTable = new JTable( stockTableModel );
    // Constructor
    public StockTablePanel()
    // Set the size of the table
    stockTable.setPreferredScrollableViewportSize( new Dimension(620, 350) );
    // Set the column widths for the table
    TableColumn column = null;
    for (int i = 0; i < 5; i++)
    column = stockTable.getColumnModel().getColumn( i );
    column.setPreferredWidth( stockTableModel.getColumnWidth( i ) );
    // Create a scroll pane and add the stock table to it
    JScrollPane scrollPane = new JScrollPane( stockTable );
    // Add the scroll pane to our panel
    add( scrollPane, BorderLayout.CENTER );
    // float getDollarChange()
    // Computes the total dollar change for the current portfolio
    public float getDollarChange()
    // Create a variable to hold the total change for all stocks
    float fTotal = 0;
    // Loop through all rows in the table
    for( int i=0; i<stockTable.getRowCount(); i++ )
    // Retrieve the dollar change for this stock
    Float f = ( Float )stockTable.getValueAt( i, 10 );
    // Add that value to our total
    fTotal = fTotal + f.floatValue();
    // Return the total value
    return fTotal;
    // float getPercentChange()
    // Computes the total percentage change for the current portfolio
    public float getPercentChange()
    // Create a couple variables to hold the total the user spent
    // on the stocks and the current value of those stocks
    float fMoneySpent = 0;
    float fMoneyWorth = 0;
    // Loop through all rows in the table
    for( int i=0; i<stockTable.getRowCount(); i++ )
    // Extract some pertinent information for the computations
    Float fLastSale = ( Float )stockTable.getValueAt( i, 2 );
    Float fNumberOfShares = ( Float )stockTable.getValueAt( i, 6 );
    Float fPricePaidPerShare = ( Float )stockTable.getValueAt( i, 7 );
    // Add the amount of money the user spent on this stock
    // to the total spent
    fMoneySpent += fNumberOfShares.floatValue() * fPricePaidPerShare.floatValue();
    // Add the value of this stock to the total value of the
    // stock
    fMoneyWorth += fNumberOfShares.floatValue() * fLastSale.floatValue();
    // Compute the percentage change:
    // TotalValue/TotalSpent * 100% - 100%
    float fPercentChange = ( (fMoneyWorth / fMoneySpent) * 100 ) - 100;
    // Return the percentage change
    return fPercentChange;
    // Main entry point into the StockTableApplication class
    public static void main( String[] args )
    // Create a frame to hold us and set its title
    JFrame frame = new JFrame( "StockTablePanel Application" );
    // Create an instance of our stock table panel
    StockTablePanel stockTablePanel = new StockTablePanel();
    // Add our tab panel to the frame
    frame.getContentPane().add( stockTablePanel, BorderLayout.CENTER );
    // Resize the frame
    frame.setSize(640, 480);
    // Make the windows visible
    frame.setVisible( true );
    // Set up a window listener to close the application window as soon as
    // the application window closes
    frame.addWindowListener
         new WindowAdapter()
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    // Table Model Class - holds all of our row and column information
    class StockTableModel extends AbstractTableModel
    // Create the columns for the table
    final String[] strArrayColumnNames =
    "Sym",
    "Company Name",
    "Last",
    "Hi",
    "Lo",
    "Vol",
    "#Shares",
    "$Shares",
    "Total",
    "%Change",
    "$Change"
    // Create the rows for the table - hard coded for now!!
    final Object[][] obArrayData =
    // Row One
    "SAMS", // Symbol
    "Sams Publishing", // Company Name
    new Float( 10 ), // Last Sale
    new Float( 12 ), // High
    new Float( 8 ), // Low
    new Double( 2000000 ), // Volume
    new Float( 100 ), // Number of Shares Owned
    new Float( 7.5 ), // Purchase price per share
    new Float( 1000 ), // Total Holdings
    new Float( 33 ), // Percent change (increase!)
    new Float( 250 ) // Dollar change
    // Row Two
    "Good", // Symbol
    "Good Company", // Company Name
    new Float( 50 ), // Last Sale
    new Float( 52 ), // High
    new Float( 45 ), // Low
    new Double( 4000000 ), // Volume
    new Float( 100 ), // Number of Shares Owned
    new Float( 30 ), // Purchase price per share
    new Float( 5000 ), // Total Holdings
    new Float( 33 ), // Percent change (increase!)
    new Float( 250 ) // Dollar change
    // Row Three
    "BAD", // Symbol
    "Bad Company", // Company Name
    new Float( 20 ), // Last Sale
    new Float( 22 ), // High
    new Float( 18 ), // Low
    new Double( 2000000 ), // Volume
    new Float( 500 ), // Number of Shares Owned
    new Float( 50 ), // Purchase price per share
    new Float( 10000 ), // Total Holdings
    new Float( -60 ), // Percent change (increase!)
    new Float( -25000 ) // Dollar change
    // Return the number of columns in the table
    public int getColumnCount()
    return strArrayColumnNames.length;
    // Return the number of rows in the table
    public int getRowCount()
    return obArrayData.length;
    // Get the column name from the strArrayColumnNames array for the "col"-th
    // item
    public String getColumnName( int col )
    return strArrayColumnNames[col];
    // Return the value, in the form of an Object, from the obArrayData object
    // array at position (row, col)
    public Object getValueAt( int row, int col )
         // We will compute columns 8, 9, and 10, so if the column number is
         // below eight, we can just return it without computing or retrieving
         // anything.
         if( col < 8 )
         return obArrayData[row][col];
         // Retrive the necessary values from the object array to compute all
         // of the remaining columns
         Float fLastSale = ( Float )obArrayData[row][2];
         Float fNumberOfShares = ( Float )obArrayData[row][6];
         Float fPurchasePrice = ( Float )obArrayData[row][7];
         switch( col )
         // Total Holdings = Last Sale(2) * Number of Shares Owned(6)
         case 8:
         // Build a new Float object with the product of the two
         Float fTotal = new Float
         // Note, these have to be converted to type "float" to
         // perform the multiplication
         fLastSale.floatValue() * fNumberOfShares.floatValue()
         // Return the result
         return( fTotal );
         // Percent change =
         // (Last Sale Price (2) / Purchase Price (7)) * 100% - 100 %
         case 9:
         Float fPercentChange = new Float
         ((fLastSale.floatValue() / fPurchasePrice.floatValue ()) * 100) - 100
         return fPercentChange;
         // Dollar Change =
         // LastSale*NumberOfShares - PurchasePrice * NumberOfShares
         case 10:
         Float fDollarChange = new Float
         ( fLastSale.floatValue() * fNumberOfShares.floatValue() )
         ( fPurchasePrice.floatValue() * fNumberOfShares.floatValue() )
         return fDollarChange;
         // We have included every case so far, but in case we add another
         // column and forget about it, let's just return its value
         default:
         return obArrayData[row][col];
    // Return the class type, in the form of a Class, for the c-th column in
    // the first (0-th indexed) element of the obArrayData object array
    public Class getColumnClass( int c )
    return getValueAt(0, c).getClass();
    // Return true if the "col"-th column of the table is editable, false
    // otherwise. The following columns are editable:
    // Cell Description
    // 0 Symbol
         // 6 Number of Shares Owned
         // 7 Purchase Price per Share
    public boolean isCellEditable(int row, int col)
         // Check the column number
         if( col == 0 || col == 6 || col == 7 )
         return true;
         else
         return false;
    // Set the value of the (row, col) element of the obArrayData to value
    public void setValueAt(Object value, int row, int col)
         // Symbol
         if( col == 0 )
         // We need a string value - we can convert any
         // value to a string, so just assign it
         obArrayData[row][col] = value;
         // Number of Shares owned
         else if( col == 6 )
         // We need a number - either float or int
         obArrayData[row][col] = new Float( getNumberString( value.toString() ) );
         // Purchase Price per share
         else if( col == 7 )
         // We need a float
         obArrayData[row][col] = new Float( getNumberString( value.toString() ) );
         // Cell is not editable
         else
         return;
         // Notify our parent of the change
         fireTableCellUpdated(row, col);
    // String getNumberString( String str )
    // Read through str and return a new string with the numbers and decimal
    // points contained in str
    public String getNumberString( String str )
    // Get str as a character array
    char[] strSource = str.toCharArray();
    // Create a buffer to copy the results into
    char[] strNumbers = new char[strSource.length];
    int nNumbersIndex = 0;
    // Boolean to ensure we only have one decimal value
    // in our number
    boolean bFoundDecimal = false;
    // Loop through all values of str
    for( int i=0; i<strSource.length; i++ )
    // Check for a digit or decimal point
    if( Character.isDigit( strSource[i] ) )
    strNumbers[nNumbersIndex++] = strSource;
    else if( strSource[i] == '.' && !bFoundDecimal )
    // Append the character to the String
    strNumbers[nNumbersIndex++] = strSource[i];
    // Note that we found the decimal value
    bFoundDecimal = true;
    // Build a new string to return to our caller
    String strReturn = new String( strNumbers, 0, nNumbersIndex );
    // Return our string
    return strReturn;
    // Return the column width of the column at index nCol
    public int getColumnWidth( int nCol )
    switch( nCol )
    case 0:
    case 2:
    case 3:
    case 4:
    case 6:
    case 7:
    case 9:
    return 50;
    case 1:
    return 125;
    default:
    return 75;
    Third one that imports the previous two programs Classes
    // Import the packages used by this class
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    // Import our other components
    import StockTablePanel;
    import PortfolioTotalsPanel;
    // StockTableTabPanel
    public class StockTableTabPanel extends JPanel implements TableModelListener
    // Create our panels
    StockTablePanel stockTablePanel = new StockTablePanel();
    PortfolioTotalsPanel portfolioTotalsPanel = new PortfolioTotalsPanel();
    // Constructor
    public StockTableTabPanel()
    // Set our layout
    setLayout( new BorderLayout() );
    // Initialize the portfolio panel
    updatePortfolioTotals();
    // Add the child panels to our JPanel
    add( stockTablePanel );
    add( portfolioTotalsPanel, BorderLayout.SOUTH );
    // Add our class as a table model listener for the stock table
    // model so that we can update the portfolio totals panel
    // whenever the table changes.
    stockTablePanel.stockTableModel.addTableModelListener( this );
    // TableModelListener: tableChanged
    public void tableChanged(TableModelEvent e)
    // Make sure it is our table that changed
    if( e.getSource() == stockTablePanel.stockTableModel )
    // Call our method to update the portfolio totals
    updatePortfolioTotals();
    // public updatePortfolioTotals
    // Updates the portfolio totals panel labels based off of the values
    // in the stockTablePanel
    public void updatePortfolioTotals()
    // Get the values from the stockTablePanel and send them
    // to the portfolioTotalsPanel
    portfolioTotalsPanel.setDollarChange( new Float( stockTablePanel.getDollarChange() ) );
    portfolioTotalsPanel.setPercentChange( new Float( stockTablePanel.getPercentChange() ) );
    // Main application entry point into this class
    public static void main( String[] args )
    // Create a JFrame object
    JFrame frame = new JFrame( "Stock Table Tab" );
    // Create an StockTableTabPanel Object
    StockTableTabPanel app = new StockTableTabPanel();
    // Add our StockTableTabPanel Object to the JFrame
    frame.getContentPane().add( app, BorderLayout.CENTER );
    // Resize our JFrame
    frame.setSize( 640, 440 );
    // Make our JFrame visible
    frame.setVisible( true );
    // Create a window listener to close our application when we
    // close our application
    frame.addWindowListener
         new WindowAdapter()
    public void windowClosing( WindowEvent e )
    System.exit( 0 );

  • Doubt on abstract classes

    Hi,
    I have doubt in abstract classes,please clarify my doubt.....my doubt is
    I have one abstract class,in that i have three methods...
    Now I have created one subclass for that abstract class....
    I defined all those methods that are there in abstract class in the sub class......and I wrote some other methods in that sub class....
    Now my question is ----->can I make the methods that are declared in abstract class invisible to the people who are using the sub class???
    Please tell me the answer...
    Thanks in advance,
    sirisha.

    ya I got it....
    Please see the code and tell me wether it is correct or not...
    abstract class One
    int i=10;
    private void display()
    System.out.println("One:display");
    public void show()
    System.out.println("One:show");
    public abstract int intadd(int j);
    class Two extends One
    int i=100;
    public void display()
    super.display();
    System.out.println("TestThr:display");
    public void show()
    //super.show();
    System.out.println("TestThr:show");
    public int intadd(int j)
    if (j==1)
         return i;
         else
    return super.i;
    public class TestThr
    public static void main(String args[])
    Two t=new Two();
         t.display();
         t.show();
         System.out.println(t.intadd(1));
    }

  • LR 4 & 4.1 can't create new folder manually during photo import

    Windows 64, i7, 12GB RAM
    I don't seem able to create a new folder manually on photo import.  This still works fine on the same PC with LR3.6.  Anyone else seeing this?  Thanks.

    I've sometimes found the 'Make New Folder' option to be a bit hit and miss on Win7....so I generally avoid it. In your case, wouldn't it be easier to have Lightroom create the folder for you by setting up your Destination panel as follows:
    Obviously the selected target parent folder in your case would be "Photos Working Folders", use "Organize: Into One Folder", tick the Into Subfolder box and enter the name of the sub-folder you want, e.g. raw0015. As you can see, if the sub-folder doesn't yet exist, Lightroom then shows you that it will be creating it for you.

  • How to trigger New page while using ALV with classes/oops?

    Hi All
    I am trying to print a report which has to show the data in two pages.
    I am using ALV with classes/oops.
    Though I am able to print the report but a new page is not coming. Whole of the data is coming in one single page.
    Please tell me as to how to trigger a NEW PAGE while using ALV with classes/oops.
    Please send some code samples also if available.
    Thanks in advance.
    Jerry

    using sort option you can do it. in case of grid/oo alv class ALV you can view that only in print mode/preview mode.
    in case of list you can view that directly.
    sort-fieldname = 'FIELDNAME'.
    sort-group = '*'  "triggers new page
    sort-up = 'X'.
    append sort to it_sort.

Maybe you are looking for

  • Sharing Itunes music between accounts on same computer

    Hi Is it possible to share Itunes music library between three accounts on same computer so if my wife logs into her account she can see my music library

  • How to restrict the alternate modes in PP/DS???

    Hi all, I have 2 levels of production, 1st is semifinished and 2nd is finished (which uses the 1st as an input) I want to relate the activities of these 2 orders such that for example, if 1st order is from resource A, then 2nd order can be restricted

  • I'm getting an error in HP Support Assistant: HPSF.exe has stopped working.

    This app has encountered a serious problem & must close.  Click OK to auto restart.  It does nothing though... I have a HP Desktop s5-1014  QN653AA#ABA

  • Adobe Acrobat 9 on Solaris x86 is now available

    http://blogs.sun.com/observatory/entry/adobe_reader http://get.adobe.com/reader/ Works well. Extracting files, please wait. (This may take a while depending on the configuration of your machine) This installation requires 171 MB of free disk space. E

  • Adding BPEL to SOA Suite 11gR1 Install

    Hi, We did a SOA Suite install 11gR1 (11.1.1.4) install on a Windows 2003 server a couple of month ago, main goal to ramp up a team on Mediator. Now they want to learn/practice with BPEL. Can we add BPEL to the install as this has not been initially