How to create an object for this Question...

i want to create an object to Factorial.java, but the class is in String object... how can i do that
please help me with code how to create an object
String str = Factorial.java;
i tried to do like this
str s1 = new str();
this way is not working...
thank u

yes sir am trying to instantiate and retrieve the metadata, am a student am asked to do Program Analyzer, while fullfilling the application requirements i came across this situation, like i have to find total number of public methods in any source file that is entered as input.
Am taking the input in String variable, i can have the details of the source class only of i instantiate and create an Object to that....
Please suggest me some way to do that... JAVA is so interesting am working on the project since 2 weeks am done with all other classes but struck here finding the total number of methods...
Thank you

Similar Messages

  • How to create Activex object for my Visual C++ object

    Hi,
    I am working on development on Acrobat 9.0 SDK. I am facing problem is that I can compiled Visual C++ source code to an api. I can test functions on this api on Acrobat 9.0 windows, but I could not test it on IE web browser, because I don't know how to create Activex object from my Visual C++ source code or its api.
    I read Acrobat 9 SDK document and found under C:\Acrobat 9 SDK\Version 1\PluginSupport\Tools\Visual Studio App Wizard has two files: Acro9PIWizInstaller.msi and setup.exe. I am not very sure those file are the key to help me to create Activex objects for my api.  Are they the one I need to create Activex object? If not, could you please advise me how to create Activex object for my api or C++ codes.
    Thanks a lot for any of your comments or advices.
    Thai

    Hi lrosenth,
    Thanks a lot for your information.
    My question is, on Javascript how do I call a function from .api. Below is my very simple test.
    I got a function on BasicPlugin.cpp under C:\Acrobat 9 SDK\Version 1\PluginSupport\Samples\BasicPlugin. See below.
    I added BasicPlugin.api on C:\Program Files\Adobe\Acrobat 9.0\Acrobat\plug_ins
         ACCB1 int ACCB2 MyPluginCommand() {
              int num = 5;
              return num;
    On my HTML file, I create an <Object> below:
        <OBJECT id="acrobatapp"
                classid="clsid:85DE1C45-2C66-101B-B02E-04021C009402">
        </OBJECT>
        <OBJECT id="acrobatpdf"
                classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"   >
            <Param name="SRC" value="http://www.adobe.com/devnet/acrobat/pdfs/acrobat_digital_signature_appearances_v9.pdf">
       </OBJECT>
    On my Javascript. I call function MyPluginCommand() as below, but it is not working. How do I call function MyPluginCommand() on Javascript?
         var acrobatapp= document.getElementById("acrobatapp");
         var num= acrobatapp.MyPluginCommand();
         alert(num);
    Thanks for your support,
    Thai

  • How to create a hirarchy for this characteristic having lengh 50?

    Hi guru's
    I have a scenario like characteristic is having lengh 50.Now I want to create a hierarchy for this characteristic.
    But Hirarchy allows maximum lengh 32chrs only.
    So could you please let me know how to create a hirarchy for this characteristic having lengh 50?
    Thanks in advance
    Sivanand

    Isn't this the same question as here:
    Hi all, Have a problem, Please let me know urgently.
    Why the duplicate postings with different names??

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

  • Salmple at How to Create Dynamical Object for RTTC

    Hi all, I need a sample at How to Create Dynamical Object for RTTC.
      you can help me?.

    Hello Martinez,
    I have attached a sample for structure types. With the Where-Used-List on the Create() Method of the various RTTC classes one may find more samples. If you meant with object on OO Type then it is to mention that this is not possible yet.
    Regards
      Klaus
    PROGRAM sample.
    DATA: sdescr1 TYPE REF TO cl_abap_structdescr,
          sdescr2 TYPE REF TO cl_abap_structdescr,
          tdescr1 TYPE REF TO cl_abap_tabledescr,
          tdescr2 TYPE REF TO cl_abap_tabledescr,
          tref1   TYPE REF TO data,
          tref2   TYPE REF TO data,
          comp    TYPE abap_component_tab,
          wa      TYPE t100,
          xbuf    TYPE xstring.
    FIELD-SYMBOLS: <tab1> TYPE table,
                   <tab2> TYPE table.
    sdescr1 ?= cl_abap_typedescr=>describe_by_name( 'T100' ).
    comp     = sdescr1->get_components( ).
    sdescr2  = cl_abap_structdescr=>create( comp ).
    tdescr1  = cl_abap_tabledescr=>create( sdescr2 ).
    tdescr2  = cl_abap_tabledescr=>create( sdescr2 ).
    CREATE DATA: tref1 TYPE HANDLE tdescr1,
                 tref2 TYPE HANDLE tdescr2.
    ASSIGN: tref1->* TO <tab1>,
            tref2->* TO <tab2>.
    wa-sprsl = 'E'. wa-arbgb = 'SY'. wa-msgnr = '123'. wa-text = 'first text'.   INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'D'. wa-arbgb = 'SY'. wa-msgnr = '456'. wa-text = 'second text'.  INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'D'. wa-arbgb = 'XY'. wa-msgnr = '001'. wa-text = 'third text'.   INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'D'. wa-arbgb = 'ZZ'. wa-msgnr = '123'. wa-text = 'fourth text'.  INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'E'. wa-arbgb = 'SY'. wa-msgnr = '123'. wa-text = 'ABAP is a miracle'. INSERT wa INTO TABLE <tab1>.
    EXPORT tab = <tab1> TO DATA BUFFER xbuf.
    IMPORT tab = <tab2> FROM DATA BUFFER xbuf.
    LOOP AT <tab2> INTO wa.
      WRITE: / wa-sprsl, wa-arbgb, wa-msgnr, wa-text.
    ENDLOOP.

  • How to create a object for IPageItemControlData?

    how to create a object for IPageItemControlData?

    From the header comment you'll see that IPageItemControlData is an Interface of PageItemWidget. That must've been an InDesign 1.0 or 1.5 feature predating kPageItemBoss, because except for the same comment even in InDesign 2.0 SDK the only further reference is a copy in the comment of its sibbling IFrameControlData which was removed with InDesign CS.
    The IID and kPageItemControlDataImpl are probably only around because deep under the hood there must be some kind of conversion provider waiting to do its job on a very old document.
    I guess the closest in today's functionality will be IHierarchy.
    Dirk

  • How to create subproject & Object for LSMW

    How to create subproject & Object for LSMW

    Rahul,
    ??? enter their names, select 'Create'.  If you do not have the 'Create' button displayed, you are not authorized.  See your local authorization person.
    Best Regards,
    DB49

  • How  to create  authorisation object for  report

    hi
    experts..
    hw  can u  create authorisation object for  the  custom report.
    Thanks&  Regards
    Spandana

    Hi,
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Sy-SUBRC values
    4              User has no authorization in the SAP System for
                   such an action. If necessary, change the user
                   master record.
    8              Too many parameters (fields, values). Maximum
                   allowed is 10.
    12             Specified object not maintained in the user
                   master record.
    16             No profile entered in the user master record.
    24             The field names of the check call do not match
                   those of an authorization. Either the
                   authorization or the call is incorrect.
    28             Incorrect structure for user master record.
    32             Incorrect structure for user master record.
    36             Incorrect structure for user master record.
    http://www.sap.ittoolbox.com/groups/technical-functional/sap-basis/please-how-to-create-an-authorization-object-386391 - 78k -
    http://www.sap-abaprogram.blogspot.com/2007/11/what-is-use-of-
    authorization-checks-to.html - 75k -
    www.sapworld.hpg.ig.com.br/download/ab4query.pdf
    with thanks,
    Abaper.

  • How to create Entity object for Non Database Object.

    Friends,
    I have a requirement something like, I will be getting some huge amount of data from external system via CORBA, I have to display the data in jsff page in <af:table>. My requirement is If User updates any of the row I need to identify what are all the rows user updated and Need to invoke again a CORBA call for only UPDATED Rows.
    Basically here, I am not dealing anything with the Database, I assume using Entity we can find out a status of the row whether the row is updated/deleted/created .
    How can I create an Entity object in this case.
    Any help will be highly appreciated !!!
    Thanks

    The basics steps are described here http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadveo.htm#sm0328
    and here http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvvo.htm#sm0341
    You need to change the underlying data source from pl/sql to meet your requirements (CORBA).
    Timo

  • How to create a constructor for this class?

    Hi everybody!
    I have an applet which loads images from a database.
    i want to draw the images in a textarea, so i wrote an inner class, which extends textarea and overrides the paint method.
    but everytime i try to disply the applet in the browser this happens:
    java.lang.NoClassDefFoundError: WohnungSuchenApplet$Malfl�che
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
         at java.lang.Class.getConstructor0(Class.java:1762)
         at java.lang.Class.newInstance0(Class.java:276)
         at java.lang.Class.newInstance(Class.java:259)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    so my class has no own constructor, it just has the paint method overwritten.
    my class looks like this:
    public class Malfl�che extends javax.swing.JTextArea{
    public void paint(Graphics g){
    Color grey=new Color(220,220,220);
    g.drawImage(img,10,10,null);
    how should a constructor for this class look like?
    sorry i am quite new to this, so i really dont have a clue!
    my class does not have any attributes or requires any so it doesnt need a constructor, doesnt it?
    thanks a lot
    tim

    If you have no constructor you cant instanciate (I know i just murdered that spelling) the object.
    Malfl�che thisHereThingie = new Malfl�che()assuming that you want to run that class by itself you will need a main method that has the preceeding code in it. If you are running it from another class you need to instanciate it... but anyway at the very least for a constructor you need.
    public Malfl�che(){

  • RethinkDB - how to create a PKGBUILD for this monster?

    Hi!
    After an interesting discussion on HackerNews about RethinkBD, I wanted to take a look for myself. Using it in Ubuntu (my work system) wasn't that bad, they build package for that one, and looked like something I might like to play with. But for that I'd wanted to have a package for my personal system running Arch, and there don't seem to be one.
    I did have a big bunch of packages before (not saying that they were any good, but have seen enough to know what might be relatively easy and what will be hard). When I checked out the build information, it just looks terrifying. The big list of dependencies is not that bad, but the other requires are nodejs, node libraries, ruby libraries, some of them are on AUR but orphaned and cannot be really relied on....
    Any suggestion how to get the bottom of this?

    Trilby wrote:Strictly speaking, your PKGBUILD only has to list the dependencies.  If the dependencies are broken, your PKGBUILD doesn't need to solve that.
    Thinking about it, I see your point, while I still feel that it's not the complete picture. That way I can make a package for myself, and using nvm/rvm for the missing packages, but e.g. then I couldn't really upload it to AUR or if I was, definitely someone would remove it because of being broken (and would be right about it.
    Trilby wrote:
    Of course it would be pointless to have a PKGBUILD that depended on something broken, but you should push those maintainers to fix their PKGBUILDs.
    Have you checked that those dependencies can't be satisfied by packages in the repos?  Nodejs, for example, is in [community] and rubygems is provided by ruby in [extra].  In fact, I don't see anything there that would not likely be provided by something in the main repos.
    EDIT: upon looking closer ruby_protobuf and coffee-script-git are aur-only, do those fail to build from the aur?
    Looking at things, they might need older nodejs version, coffee-script and their dependencies are in AUR, ruby_protobuf and ruby-less (and their dependencies) seem to be orphaned packages on AUR....

  • How to create VB Object for a pdf embedded in IE 6 Browser?

    I'm hoping to automate the testing of PDF forms on our web based application. Each PDF form is embedded in IE 6 below a series of hyperlinks. I'm trying to write a VB function which accesses the PDF form already opened in the IE Browser, clicks on the "Button 1" button embedded in the form, then clicks on "Button 2" button. The buttons are in the PDF in the form of gray boxes - Button 2 becomes visible after Button 1 gets clicked. are I've a series a questions on how I get about implementing that.
    * Set pdDoc = CreateObject( "AcroExch.PDDoc" ) How do I make this pdDoc object point to the already open pdf in the browser. The pdDoc.Open() does not seem to accept a URL. Neither does the url end with a ".pdf" since the pdf is displayed at a lower hierarchy in the screen.
    * Currently I'm using the TextSelect method to search for "Button 1" button and then get the co-ordinates for the selected text. Is there any method to get the mouse to click the co-ordinates or to identify the buttons in the form itself?
    I'm very new to the SDK. I've Acrobat 8 & VB installed on my PC. I've read the IAC & related guides but can't seem to make a headway. Any help would be much appreciated.
    Thanks in Advance.

    Thanks for the update Leonard. This would be an extremely useful plugin. I've been looking for it on http://labs.adobe.com/technologies/ under the plug-ins tab but have been unable to find it. It wasn't even there in the Pre-Release Programs. Is it located somewhere else or with a different name? Please let me know.
    Meanwhile, I've been trying to write my own VB script to get the button clicked. Here's what I've come up till now-
    FindText
    HiliteList.Add->CreateWordHilite->SetTextSelect->GetBoundingRect->PointToDevice
    The last function seems to be deprecated. Also there's nothing to connect the text highlighted by findtext with HiLiteList.Add. I guess
    I may have to use the JSO word search method.
    Any advice, as always, would be much appreciated.

  • How to create unique object for dynamically created jTextFields

    Hello to all forum members
    According to my requirement , i have created a number of jpanels(containing textfield,comboboxes etc) and added them to a jScrollPane.
    But my requirement is after adding the jPanels to the JScrollPanel, i want to add some logic to that jpanels; like
    1) i want to sort the panels according to some condition when a sort button is clicked
    2)and the text field which are in the panel should be sorted according to the integer value inside the text field.
    3) and after a buton clicked the value what are in the jText field should store in the data base etc.....
    For the above logic to apply i need the instance variable(i.e object reference ) should be difference, so that when i want to get a value from any component ( text from jtextfield ) i can get the value through its instance variable name.for example
    JTextField textField1=new JTextField("aaa");
    JTextField textField2=new JTextField("cccc");
    JTextField textField3=new JTextField("eee");then
    textField1.getText();
    textField2.getText();
    textField3.getText();But the problem is when i am creating the number of panels the name of the instance variables (of all the components i.e textfield ,panels)are same so i can't add the logic to any particular component.
    I have tried to solve this problem , but not getting any idea .Please help me to find out the solution. I hope i explained my problem clearly if not
    tell me i will explain it again.
    I have given here with the code in which i have created 100 jpanels , each jpanels consisting of 1label and 1text field but the instance variable for each component is same.
    Plese help me to solve this problem,Thanks in advance.
    import javax.swing.*;
    public class NestedPanels extends JFrame
      private static final int NO_OF_NESTED_PANELS = 100;
      public NestedPanels()
        super("Nested Panels");
        setSize(200, 200);
        JPanel mainPanel = new JPanel();
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
         for ( int i=1; i<=NO_OF_NESTED_PANELS; i++)
             mainPanel.add(createChildPanel(i));
         javax.swing.JScrollPane jScrollPane = new javax.swing.JScrollPane();
         jScrollPane.setViewportView(mainPanel);
        getContentPane().add(jScrollPane);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setVisible(true);
      private JPanel createChildPanel(int intChildPanelNumber)
        JPanel childPanel = new JPanel();
        childPanel.setLayout(new BoxLayout(childPanel, BoxLayout.X_AXIS));
        childPanel.add(new JLabel("" + intChildPanelNumber));
        childPanel.add(new JTextField());
        return childPanel;
      public static void main(String[] argv)
        javax.swing.SwingUtilities.invokeLater(new Runnable()
          public void run()
            NestedPanels example = new NestedPanels();
    }Thanks & Regards
    Mahendra

    Hi to all forum members,
    Thanks for all your help.
    JayDS, as you have told i have tried with
    return Integer.valueOf( getText() ).compareTo( Integer.valueOf( mp.getText() ) );but it is giving
    java.lang .NumberFormatException.forInputString(unknown source)
    sorry i could not get what is SSCE?
    I am sending the code here with my requirement.
    My requirement is to sort the panels.
    i.e.
    when I will click on to the sortC1 button , the whole panels should be sorted according to the integer value inside the textfield1 (but here in my code it is sorting string wise,if u enter 1,2 ,1111111,3 ,222 the output should be 1,2,3, ,222 ,1111111 but it is actually giving the output as 1, 1111111,2,222,3 which is wrong )
    Arrays.sort(NestedPanelSorting); => this method is used for sorting
    return getText().compareTo(mp.getText());=> method is used for the text comparision in the example ( NestedPanelSorting.java)
    sortC2 also same.
    When I will click sortC3 ,the panel will be sorted according to the string values in the dropdown of combo boxes. Here how to access the instance of combobox to sort or the panel or through array of objects how can i sort?
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Arrays;
    import javax.swing.*;
    public class NestedPanelSorting extends JFrame
        private static final int NO_OF_NESTED_PANELS = 10;
        private MyPanel[] NestedPanelSorting = new MyPanel[NO_OF_NESTED_PANELS];
        //MyPanel[] is a array of MyPanel objects declared below
         private JPanel mainPanel;
        private JScrollPane jScrollPane;
         public NestedPanelSorting()
            super("Nested Panels Sorting");
            setSize(400, 200);
            mainPanel = new JPanel();
            mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
            //in the for loop below MyPanel(i) is called through NestedPanelSorting[i]
              for (int i = 0; i < NestedPanelSorting.length; i++)
                NestedPanelSorting[i] = new MyPanel(i);
                mainPanel.add(NestedPanelSorting);
    jScrollPane = new javax.swing.JScrollPane();
    jScrollPane.setViewportView(mainPanel);
    getContentPane().add(jScrollPane, BorderLayout.CENTER);
    JButton myBtn1 = new JButton("sortC1");
              JButton myBtn2 = new JButton("sortC2");
              JButton myBtn3 = new JButton("sortC3");
    getContentPane().add(myBtn1, BorderLayout.EAST);
    getContentPane().add(myBtn2, BorderLayout.WEST);
    getContentPane().add(myBtn3, BorderLayout.SOUTH);
              myBtn1.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent arg0)
    myButtonAction(arg0);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setVisible(true);
    private void myButtonAction(ActionEvent arg0)
              //this Array.sort() method is for sorting the array -
              // accordig to string value but i need to sort integer value wise
    Arrays.sort(NestedPanelSorting);
              mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel,
    BoxLayout.Y_AXIS));
    for (int i = 0; i < NestedPanelSorting.length; i++)
    mainPanel.add(NestedPanelSorting[i]);
    jScrollPane.setViewportView(mainPanel);
         public static void main(String[] argv)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    new NestedPanelSorting();
    //declaring of MyPanel class where textfield1,txtField2,comboBox1 are added
         class MyPanel extends JPanel implements Comparable<MyPanel>
    private int number;
    private JTextField txtField1;
              private JTextField txtField2;
    private JComboBox comboBox1;
    public MyPanel(int number)
                   super();
    this.number = number;
    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    add(new JLabel(String.valueOf(number)));
    txtField1 = new JTextField();
    add(txtField1);
                   txtField2 = new JTextField();
    add(txtField2);
                   comboBox1=new JComboBox();
                   comboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ITEM  1 ", "ITEM  2 ", "ITEM  3 ", "ITEM  4 ","ITEM  5 " }));
                   add(comboBox1);
    public int getNumber()
    return number;
              public String getText()
                   if (txtField1.getText() == null)
    return "";
                   return txtField1.getText();
         public int compareTo(MyPanel mp)
              return getText().compareTo(mp.getText());
              //return Integer.valueOf( getText() ).compareTo( Integer.valueOf( mp.getText() ) );

  • How to create view object for a predefined Oracle view

    Trying to create an entity object with no success,,,
    I have an Oracle view(complex query in PL/SQL) that I need to encapsulate as a View Object then represent a column from this view as a '' | | linkcolumn | | ''
    then get a reference of the requestParameter "p" in this case that I need to use as whereclause parameter on another view object that is part of the ListPage.jsp.
    The application is basically a page of organization links that when click filters their reports as a list,
    In Jdeveloper's context webBean(RowSetBrowser list [org links] to RowSetBrowser [org report list])
    Can I implement this functionallity using the wizards or possibly writing custom code using the standard webBeans.

    Jerry,
    First, you can create an entity object based on an Oracle view. If you check the "Views" checkbox in the EO wizard, you'll see a list of database views. Then you can create a view object based on your entity object, and use it like any other view object.
    As for getting the page into the format you want, I suggest you start by generating your page using the BC4J JSP wizard, then customize the generated JSP.
    Thanks
    Blaise

  • How to create more instances for this text game.  Help please!

    Hey guys, so far this code works great, but I'm trying to add more questions and answers to this and I'm having trouble doing that. I've tried using different methods and just going from method to another, but I can't seem to get it to work right. Should I be able to do it with different methods or is there another way I should be doing this?? I also want to add a score to this game as well. Adding points for each correct guess and I searched online trying to find a point to start, but couldn't quite get a hold on it. This is just something that would be cool to add, but isn't necessary if you don't think you can help me out. Thanks for checking this out and for the help!!
    public class TextShuffleGame
         private CinReader reader;
         public TextShuffleGame ()
              reader = new CinReader();
         public void go ()
              System.out.println("");
              System.out.println("Welcome to Text Shuffle.");
              int tries = 0;
              boolean correctGuess = false;
              while (correctGuess == false && tries < 5)
              System.out.println("What 6-letter word is made up from the letters \"dunops\"?");
              String guess3 = reader.readString();
              String answer3 = "pounds";
                        if (guess3.equalsIgnoreCase(answer3))
                             System.out.println("Hooray! You are correct!");
                             correctGuess = true;
                        else
                             System.out.println("Sorry, Try again!");
                             tries++;
              public static void main(String[] args)
              TextShuffleGame thisClass3 = new TextShuffleGame();
                   thisClass3.go();
    }

    If I understand you correctly, you want to add more words to the program. If so, then create an array or some other Collection to store a bunch of words. Then you need to randomly select a word from the list. Create another method to randomly shuffle the letters and display that instead of hardcoding it. Then when a user types a guess you compare it to the word in the list, once again instead of hardcoding it.

Maybe you are looking for

  • Error login to Exchange Admin Center

    I am getting error as i login to Exchange Admin Center on IE. I am using Windows server 2012 R2 and IE version 11 I am able to login using firefox. I am doing the transition from Exchange 2k7 to 2k13 please do refer the screenshot.

  • Queries on two fronts

    I am experiencing 2 problems, in the last few days. 1) Why do some icons on my Desktop have a small grey square with a white triangular line inside, and what does this mean. 2) I have wanted to send some multiple pic files to another Forum, nothing t

  • Black "picture frame" around window

    A strange black "picture frame" shows up around windows which are active. Doesn't show up on Entourage. Appears like a non-damaging virus, but I don't know what it could be. Any ideas how to get rid of it?

  • Unable to read .doc files

    When someone sends me a Microsoft Word file with a .doc extension, I can't open it. Is there any way to do this without spending the $400 MS wants to buy Word?

  • Can't get RAID Card to work.

    I bought a Rosewill RC-200 raid card and can't get windows to instal to it with 2 x 80 gb drives RAID 0.  In the BIOS, it doesn't show up in the "Standard CMOS Features" list, which I guess might make sense, but it does show up in the Hard Disk Boot