Trying to add a java.awt.Choice object to a JTable

Hi
I am creating an app. which uses a JTable as the front end, displaying string data in all cells except the first column, which I need to make java.awt.Choice objects (or equivalent) - users will click the cell, a list of job numbers will be displayed and they click the one they want.
Every time I run the app instead of a drop down list of job numbers I get the text:
java.awt.Choice[choice0,0,0,0x0,invalid,current=K5000]
I am unsure how to proceed.
Any and all help appreciated - for reference my code at present is:
Choice jobNumber = new Choice();
jobNumber.addItem("K5000");
Object[][] dataValues = {
{jobNumbers[0], "A job title", new Integer(0), new Integer(0), new Integer(8), new Integer(8), new Integer(4), new Integer(0), new Integer(0)},
where the JTable constructor is passed this array
regards
David

Don't mix Swing and AWT!! Have a look at the JTable tutorial on this site.
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#combobox

Similar Messages

  • How to improve performance of java.awt.choice

    Hi!
    In my GUI I'm using a java.awt.choice. The problem is, when my app starts this choice is filled with lots of values with add(...).
    This takes quite a long time. I've already set the choice invisible before the filling, so a little bit performance is gained there.
    Is there any other way to tune this choice?
    Thank you!

    Try to fill the choice before adding it to the container

  • The method add() in java.awt.Container made me in confuse

    Here is my two java code file:
    //MyContainer.java
    package sam.gui;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import javax.swing.JApplet;
    import javax.swing.JFrame;
    public class MyContainer extends JApplet {
         private MyButton[] myButton = new MyButton[2];
         private static int counter = 0;
         public MyContainer() {
              myButton[0] = new MyButton(5, 5, 200, 30);
              myButton[1] = new MyButton(5, 40, 200, 30);
              for (int i = 0; i < myButton.length; i++) {
                   add(myButton);
         public void paint(Graphics g) {
              for (int i = 0; i < myButton.length; i++) {
                   System.out.println("MyButton : " + (i+1));
                   myButton[i].draw(g);
         public static void main(String[] args) {
              MyContainer container = new MyContainer();
              JFrame f = new JFrame();
              f.getContentPane().add(container);
              f.pack();
              f.setSize(new Dimension(300, 200));
              f.show();
    //MyButton.java
    package sam.gui;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    public class MyButton extends Component {
         private Color m_rectColor = new Color(128, 73, 0);
         public MyButton(int x, int y, int width, int height) {
              setBounds(x, y, width, height);     
         public void draw(Graphics g) {
              Graphics2D g2 = (Graphics2D)g;
              g.setColor(m_rectColor);
              g.fillRect(0, 0,
                        getBounds().width, getBounds().height);
              System.out.println("x = " + getBounds().x);
              System.out.println("y = " + getBounds().y);
              System.out.println("width = " + getBounds().width);
              System.out.println("height = " + getBounds().height);          
    I thinked the runned result should be below:
    MyButton : 1
    x = 5
    y = 5
    width = 200
    height = 30
    MyButton : 2
    x = 5
    y = 40
    width = 200
    height = 30But in fact, its result is here:
    MyButton : 1
    x = 5
    y = 5
    width = 200
    height = 30
    MyButton : 2
    x = 0
    y = 0
    width = 292
    height = 173I don't know why the result would like this? I have used add(...) method to add two component MyButton to the container MyContainer, But the bounds of the second component is not I want.
    So this problem made me go into confuse.

    You need to learn how layout managers work. The default layout manager of a JApplet and JFrame is BorderLayout .
    /Kaj

  • Trying to add a listener to a JComboBox in a JTable

    Hi all.
    I have a little problem which I can't resolve.
    I made a program in which I create a table using a class which extends JTable (but this isn't the point with the problem, I think. It's only for rendering purposes)
    In this table I put various types of items (such as Strings, JButton, JComboBox). I have no problem with the visualization of them, but the problem is with the listener for the combo boxes. I created a listener of my own and registered it in the constructor of the combo box editor, but when I change a value it's never fired. Can someone please help me?
    Here's some code which can help understanding the problem
    Combo box editor:
    public class MyComboBoxEditor extends DefaultCellEditor{
    public MyComboBoxEditor(JTableX _tabellaDiAppartenenza) {
    super(new JComboBox());                  
    (JComboBox)super.editorComponent).addItemListener(new MyItemListener((JComboBox)super.editorComponent));    
    public Component getTableCellEditorComponent(JTable arg0, Object arg1, boolean arg2, int arg3, int arg4) {
    String elementi[]=new String[((JComboBox)arg1).getItemCount()];
    for(int i=0;i<((JComboBox)arg1).getItemCount();i++){
    elementi=(String)((JComboBox)arg1).getItemAt(i);
    super.editorComponent=new JComboBox(elementi);
    return super.getTableCellEditorComponent(arg0, arg1, arg2, arg3, arg4);
    }combo box listener:public class MyItemListener implements ItemListener{
    private JComboBox combo;
    public MyItemListener(JComboBox object){
    combo=object;
    public void itemStateChanged(ItemEvent arg0) {
    int changeEvent = arg0.getStateChange();
    if(changeEvent==ItemEvent.SELECTED){
    Object value=arg0.getItem();
    combo.setSelectedItem(value);
    }table:public class JTableX extends JTable{
    protected MyCellEditorModel myCellEditorModel;
    public JTableX(MyDataModel tm){
    super(tm);
    Object ge = defaultEditorsByColumnClass.get(Boolean.class);
    DefaultCellEditor dce = (DefaultCellEditor)ge;
    dce.setClickCountToStart(0);
    MyButtonEditor mbe = new MyButtonEditor(new JCheckBox("Bottone"), this);
    mbe.setClickCountToStart(0);
    MyComboBoxEditor mcbe = new MyComboBoxEditor(this);
    mcbe.setClickCountToStart(0);
    defaultEditorsByColumnClass.clear();
    Hashtable cellEditors = new Hashtable();
    cellEditors.put(JButton.class, mbe);
    cellEditors.put(JComboBox.class, mcbe);
    cellEditors.put(Boolean.class, dce);
    this.defaultRenderersByColumnClass.put(JButton.class, new MyButtonRenderer());
    this.defaultRenderersByColumnClass.put(JComboBox.class, new MyComboBoxRenderer());
    defaultEditorsByColumnClass.put(Object.class, new MyCellEditorModel1(cellEditors));
    public TableCellEditor getCellEditor(int row, int col){
    if(myCellEditorModel!=null) return myCellEditorModel;
    return super.getCellEditor(row,col);
    public TableCellRenderer getCellRenderer(int row, int column) {
    Object value = getValueAt(row,column);
    if (value !=null) {
    return getDefaultRenderer(value.getClass());
    return super.getCellRenderer(row,column);
    public void setCellEditor(MyCellEditorModel anEditor) {
    myCellEditorModel = anEditor;
    }Hoping the code is enough to understand the problem, I thanks all for watching and reading the post and for the future answeres.
    Bye all.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    super.editorComponent=new JComboBox(elementi);You create a new combo box each call to getTableCellEditComponent() (overriding the one of the constructor), but you aren't adding a ItemListener to it.

  • How to set the number of rows that an awt.Choice can display

    Dear Sir,
    I want to ask how an awt.Choice  can set the number of rows that it can display, like the method setMaximumRowCount in JCombobox. Since I want to set more row can be displayed, but choice no any method can set. And I have tried to add Jcombobox into awt.frame, then, the handling event function cannot receive event for the right-top cornet button(minimize, maximum, close).
    Best Regards,

    please post a Short, Self Contained, Correct Example showing your problem.
    bye
    TPD

  • Quality of Cursors created with java.awt.Toolkit(createCutsomCursor)

    Hi -
    I encountered a small problem while creating my own cursors for my Java application , I used the java.awt.Toolkit Objects createCustomCursor method to use a .GIF image as a cursor ... it worked but the quality of that cursor is horrible, the outline is rough ... I tried the same with a transparent PNG file afterwards unfortunately the same result , does anyone know why the quality is that bad or may this just be a problem of the choosen color pool ?
    Help would be very appreciated since I have no clue how to use .cur files ... seems like a non supported format , in case someone knows how to import those it would help a lot if you would drop some lines of code.
    I am currently using Java 2 SDK 1.4.0_01 , newest version.
    Thanks for you time and thanks in advance for possible answers
    -- Harald Scheckenbacher

    I noticed this problem too. It looks like the routine is generating cursors which are scaled to to the maximum size of the system. On my win XP system,
    Dimension dim = toolkit.getBestCursorSize(256, 256);
    int maxColors = toolkit.getMaximumCursorColors();
    return 32,32 and 256 respectively
    If I provide a 16x16, all the pixels have been pixel doubled. If I specify a 32x32 image, then the cursor looks perfect. This looks like a bug for the java folks. Not sure why someone would ever want a cursor image to be pixel scaled.
              

  • Problem with Horizontal Scroll on java.awt.List

    I use the same code for a General Application as a CDC Application.
    I have no problem at all with the General Application but on the CDC I can't scroll to the right (horizontal).
    Why do I get this problem on the CDC application and not on a regular application?
    I use the PP-1.0 Profile for the CDC application. Does it not support horizontal scroll on java.awt.List?
    This is the code:
    * Main.java
    * Created on den 22 augusti 2007, 10:52
    package cdcapplication6;
    * @author  Erik Rothman
    public class Main extends java.awt.Frame {
        /** Creates new form Main */
        public Main() {
            initComponents();
              for (int i = 0; i < 10; i++) {
                   list1.add("Short text");
                   list1.add("Some very long text indeed. Some very long text indeed.");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            list1 = new java.awt.List();
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            add(list1, java.awt.BorderLayout.CENTER);
            pack();
        }// </editor-fold>                       
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {                         
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        // Variables declaration - do not modify                    
        private java.awt.List list1;
        // End of variables declaration                  
    }

    I use the same code for a General Application as a CDC Application.
    I have no problem at all with the General Application but on the CDC I can't scroll to the right (horizontal).
    Why do I get this problem on the CDC application and not on a regular application?
    I use the PP-1.0 Profile for the CDC application. Does it not support horizontal scroll on java.awt.List?
    This is the code:
    * Main.java
    * Created on den 22 augusti 2007, 10:52
    package cdcapplication6;
    * @author  Erik Rothman
    public class Main extends java.awt.Frame {
        /** Creates new form Main */
        public Main() {
            initComponents();
              for (int i = 0; i < 10; i++) {
                   list1.add("Short text");
                   list1.add("Some very long text indeed. Some very long text indeed.");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            list1 = new java.awt.List();
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            add(list1, java.awt.BorderLayout.CENTER);
            pack();
        }// </editor-fold>                       
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {                         
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        // Variables declaration - do not modify                    
        private java.awt.List list1;
        // End of variables declaration                  
    }

  • Java.awt.Window: inner size

    Whilst it is clearly easy to work out the external size of a java.awt.Window object, does anybody have a way of querying the inner size of the Window (i.e. the available internal space, once the window's borders have been taken into account )?
    Many thanks
    Ali

    GAHick,
    Get the total window size, then get the insets of the window, subtract the window size from the windows insets and you will be left with the total available internal space.
    -- Bud

  • Will 2D objects in java.awt.geom.* be Serializable in next version of Java?

    I am pretty frustrated about having to write my own Serializable classes. I'm not sure if this is the right place to ask, but will the next version of Java supports Serializable 2D objects?
    Further, I was trying to write my own class to extend java.awt.geom.GeneralPath to become Serializable, but it's declared "final". What should I do? (I had no problems with Rectangle2D.Double, Line2D.Double, etc.)
    Any help is greatly appreciated.
    Selwyn

    Your code for serializing the state of the General path forgets two things:
    1. the winding rule
    2. the segments types!
    You could use a vector, but I just directly wrote to the file:
    private void writeObject(ObjectOutputStream oos) throws IOException
    {     out.defaultWriteObject();
         //write state of transient GeneralPath _gp;
         out.writeInt(_gp.getWindingRule());
         float[] coord = new float[6];
         PathIterator i = _gp.getPathIterator(null);
         while(!i.isDone())
         {     int seg = i.currentSegment(coords);
              writeInt(seg);
              //switch on seg, writing correct # of floats from coords
              i.next();
         out.writeInt(-1);     //sentinel for end-of-data: SEG_LINETO etc are [0,4]
    private void readObject(ObjectInputStream in)
    throws IOException, ClassNotFoundException
    {     in.defaultReadObject();
         int rule = in.readInt();
         _gp = new GeneralPath(rule);
         //etc...
    }3. I'm just winging this code -- haven't tested it
    --Nax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Java.awt.Container.add(Container.java:345) how can i handle this

    dear all,
    i want to design an outlook for a chat applet. but this seems to tough as i am getting a run time error
    my code is:
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    * the import that are required for this class
    public class outer extends Frame //implements ActionListener, Runnable
    private TextField txtusername,txtpassword,txtroomname;
    private Label lblusername,lblpassword,lblroomname,lbllistofrooms;
    Button okBtn,exitBut;
    Color backColor=null,btnBackClr=null,btnForeClr=null;
    String[] roomsavailable = {" one ", " two ", " three", " four"};
    private JList rooms = new JList(roomsavailable);
    /** the costructor*/
    public outer()
    { // super(st);
    backColor=new Color(200,200,255);
    btnBackClr=new Color(225,240,255);
    btnForeClr=new Color(205,205,205);
    setBackground(backColor);
    setLayout(null);
    lblusername = new Label("Username");
    lblusername.reshape(insets().left+5,insets().top+10,60,20);
    add(lblusername);
    txtusername=new TextField();
    txtusername.reshape(insets().left+75,insets().top+10,60,20);
    add(txtusername);
    lblpassword = new Label("Password");
    lblpassword.reshape(insets().left+5,insets().top+30,60,20);
    add(lblpassword);
    txtpassword=new TextField();
    txtpassword.reshape(insets().left+75,insets().top+30,60,20);
    add(txtpassword);
    lblroomname = new Label("Select Room");
    lblroomname.reshape(insets().left+5,insets().top+50,60,20);
    add(lblroomname);
    txtroomname=new TextField();
    txtroomname.reshape(insets().left+75,insets().top+50,60,20);
    add(txtroomname);
    okBtn=new Button("Login");
    okBtn.reshape(insets().left+25,insets().top+80,60,20);
    add(okBtn);
    // okBtn.addActionListener(this);
    exitBut=new Button("EXIT");
    exitBut.reshape(insets().left+50,insets().top+80,60,20);
    add(exitBut);
    // exitBut.addActionListener(this);
    public static void main(String[] args)
    // Create a JFrame
    JFrame frame = new JFrame("client side");
    // Create a outer class object
    outer outerobj = new outer();
    // Add the outer to the JFrame
    frame.getContentPane().add(outerobj, BorderLayout.WEST);
    // Set Jframe size
    frame.setSize(800, 400);
    //set resizable true
    frame.setResizable(true);
    // Set JFrame to visible
    frame.setVisible(true);
    // set the close operation so that the Application terminates when closed
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    when i compile it it compiles but gives run time error like this
    RUN TIME error:
    Exception in thread "main" java.lang.IllegalArgumentException: adding a window
    to a container
    at java.awt.Container.addImpl(Container.java:434)
    at java.awt.Container.add(Container.java:345)
    at outer.main(outer.java:75)
    Press any key to continue...
    i know erroe in this line
    frame.getContentPane().add(outerobj, BorderLayout.WEST);
    but how shall i add to get the proper layout by getting benifit of insets method
    reply soon
    please

    You can't add a frame to a frame.
    Try chaing the class definition from
    public class outer extends Frameto
    public class outer extends PanelPlease note to format your code (you'll get a faster response) use [ code]
    Object names should always start with a capital letter. outer --> Outer

  • Trying to publish a java object to PL/SQL

    Im really new to java and I've been trying to figure this out all day. Can someone PLEASE help me? Im trying to publish a java class I found off the internet to PL/SQL. I Can't seem to get the wrapper right... what am I doing wrong? The class is posted below and all the words bolded is what i've tried so far.. everything seems right for me, as I've done this the same way with a few other java objects..
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "unzip" AS
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    class unzip
    public static void Unzip_File(String args[])
    if(args.length < 1)
    System.out.println("Syntax : unzip zip-file destination-dir[optional]");
    return;
    try
    ZipFile zf = new ZipFile(args[0]);
    Enumeration zipEnum = zf.entries();
    String dir = new String(".");
    if( args.length == 2 )
    dir = args[1].replace('\\', '/');
    if(dir.charAt(dir.length()-1) != '/')
    dir += "/";
    while( zipEnum.hasMoreElements() )
    ZipEntry item = (ZipEntry) zipEnum.nextElement();
    if( item.isDirectory() ) //Directory
    File newdir = new File( dir + item.getName() );
    System.out.print("Creating directory "+newdir+"..");
    newdir.mkdir();
    System.out.println("Done!");
    else //File
    String newfile = dir + item.getName();
    System.out.print("Writing "+newfile+"..");
    InputStream is = zf.getInputStream(item);
    FileOutputStream fos = new FileOutputStream(newfile);
    int ch;
    while( (ch = is.read()) != -1 )
    fos.write(ch);
    is.close();
    fos.close();
    System.out.println("Done!");
    zf.close();
    catch(Exception e)
    System.err.println(e);
    SQL> CREATE OR REPLACE PROCEDURE UNZIP_FILE (
    2 P_Z_FILE VARCHAR2,
    3 P_Z_FILE_NAME VARCHAR2) AS LANGUAGE JAVA
    4 NAME 'unzip.Unzip_File()';
    5 /
    Procedure created.
    SQL> exec unzip_file('D:\Empower\Dev\ACH\ACH_DNLD\RESPONSE.zip', 'D:\Empower\Dev\ACH\ACH_DNLD\ACH_PR
    OCESS');
    BEGIN unzip_file('D:\Empower\Dev\ACH\ACH_DNLD\RESPONSE.zip', 'D:\Empower\Dev\ACH\ACH_DNLD\ACH_PROCES
    ERROR at line 1:
    ORA-29531: no method Unzip_File in class unzip
    ORA-06512: at "LOANADMIN.UNZIP_FILE", line 0
    ORA-06512: at line 1
    SQL> ed
    Wrote file afiedt.buf
    1 CREATE OR REPLACE PROCEDURE UNZIP_FILE (
    2 P_Z_FILE VARCHAR2,
    3 P_Z_FILE_NAME VARCHAR2) AS LANGUAGE JAVA
    4* NAME 'unzip.Unzip_File(java.lang.String,java.lang.String)';
    SQL> /
    Procedure created.
    SQL> exec unzip_file('D:\Empower\Dev\ACH\ACH_DNLD\RESPONSE.zip', 'D:\Empower\Dev\ACH\ACH_DNLD\ACH_PR
    OCESS');
    BEGIN unzip_file('D:\Empower\Dev\ACH\ACH_DNLD\RESPONSE.zip', 'D:\Empower\Dev\ACH\ACH_DNLD\ACH_PROCES
    ERROR at line 1:
    ORA-29531: no method Unzip_File in class unzip
    ORA-06512: at "LOANADMIN.UNZIP_FILE", line 0
    ORA-06512: at line 1
    any help would be great. Thanks in advance :)

    There are a substantial number of Java demos, and sample code, under $ORACLE_HOME.

  • Class is not appearing in "Java Batch Job Class Search" when trying to add.

    Hi,
    I have oracle CC&B 2.3.1, with SDK 2.2.0.12. I am trying to create new java batch job class by copying an existing one and modifying it to be used with new Batch Control .
    Steps are as follows:
    1-Created file by copying the exiting file
    CreateLatePaymentChargesProcess.java ; and only changing the name of the class:
    public class CmCreateLatePaymentChargesProcess
    extends CmCreateLatePaymentChargesProcess_Gen
    File location :
    D:\spl\ccb231\applycm\ssgc_patch\java\source\cm\ CmCreateLatePaymentChargesProcess.java
    D:\spl\ccb231\applycm\ssgc_patch\java\source\cm\ CmCreateLatePaymentChargesProcess_Gen.java
    2-Run ApplyCm build successfully , which generated these files:
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\ CmCreateLatePaymentChargesProcess.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\ CmCreateLatePaymentChargesProcess_Gen$1.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen$ThreadParameters.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen$ToDoProperties.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$JobParameters.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen.class
    All the above classes are part of CM.jar file
    ContextManagedObjects.xml ;  contains these information
    <com.splwg.shared.environ.ContextManagedObjectData>;
    <domainPackages/>
    <lookupFieldClasses class="tree-map">
    <no-comparator/>
    </lookupFieldClasses>
    <cobolAlgorithmInterfaceExtensions class="tree-map">
    <no-comparator/>
    </cobolAlgorithmInterfaceExtensions>
    </com.splwg.shared.environ.ContextManagedObjectData>;
    packageMetaInfo.xml was not created
    Still the class is not appearing in "Java Batch Job Class Search" when trying to add a new program name referencing this java class.
    I tried restarting the Tomcat application server, still not appearing.
    Where did I go wrong about it?
    Thanks
    Edited by: cc&amp;amp;amp;b-user on Jul 29, 2011 12:39 AM
    Edited by: ccb-user on Aug 2, 2011 9:28 PM
    Edited by: ccb-user on Aug 7, 2011 11:36 PM

    Hi,
    Did you copying the base file CreateLatePaymentChargesProcess.java?
    I also create a new batch job which copying the CreateLatePaymentChargesProcess batch code the only difference in getBills() method query and inner class CreateLatePaymentChargesProcessWorker extend CmCreateLatePaymentChargesProcessWorker_Gen, instead of CreateLatePaymentChargesProcessWorker_Gen.
    The batch is working fine in my end.
    Thanks,
    Atul Singh.

  • I have Acrobat XI and am trying to add pages to a pdf. Tutorials instruct to use Tools, Options or Page Thumbnail to get to a drop down command of Insert Page, does not appear as my choices.

    I have Acrobat XI and am trying to add pages to a pdf. Tutorials instruct me to use Tools, Options or Page Thumbnail to get to a drop down command of Insert Page, but I have few choices in any of those places and Insert Page is not any of them.

    What do you see, then?
    On Thu, Feb 26, 2015 at 4:14 PM, lindab5415 <[email protected]>

  • Get an error when trying to add a new object!

    Post Author: zhaodifan
    CA Forum: Administration
    I was trying to add a new object from central management console and I got the following error:
    Retrieve Error
    There was an error while retrieving data from the server: Failed to read data from report file C:\WINNT\Temp\pres_report.rpt. Reason: Operation not yet implemented. File C:\WINNT\TEMP\tmpreport\~ci226c521bf2923e0.rpt.
    The report I am trying to add was running on a Linux box with the same version BusinessObjects Cyrstal 11 running. I want to move it to a Windows box... The report itself shouldn't have problems because it was running fine on the linux box...
    Also want you let you know that I don't know too much about Crystal Report and our Crystal Report admin quited his job last week! I will be very appreciated if anybody can give me any advice. Thank you!
    Difan

    If this is a Gmail account you might need to unlock by going here: https://accounts.google.com/DisplayUnlockCaptcha.

  • Java.awt.IllegalComponentStateException in JTable

    Hi folks,
    I am trying to write a JTable cell validation. Input data in a cell, if failure, prompt message and set focus & editing back to the cell. I've tried InputVerifier() but it doesn't work since I can easily use the mouse click to shift to other cells in the same table.
    What I am trying to do now is to define my DefaultCellEditor. I record the row & index position when getting focus. In the lost focus event, do the validation and set the focus & editing back if failure. Seems it works fine. However, when I randomly click different cells in the table quickly. It prompts:
    "java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location"
    Here is my stack dump:
         at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1487)
         at java.awt.Component.getLocationOnScreen(Component.java:1461)
         at javax.swing.Autoscroller.mouseDragged(Autoscroller.java:79)
         at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:2759)
         at java.awt.Component.processEvent(Component.java:4822)
         at java.awt.Container.processEvent(Container.java:1525)
         at java.awt.Component.dispatchEventImpl(Component.java:3526)
         at java.awt.Container.dispatchEventImpl(Container.java:1582)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.repostEvent(BasicTableUI.java:475)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mouseDragged(BasicTableUI.java:554)
         at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:258)
         at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:257)
         at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:257)
         at java.awt.Component.processMouseMotionEvent(Component.java:5069)
         at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:2763)
         at java.awt.Component.processEvent(Component.java:4822)
         at java.awt.Container.processEvent(Container.java:1525)
         at java.awt.Component.dispatchEventImpl(Component.java:3526)
         at java.awt.Container.dispatchEventImpl(Container.java:1582)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3359)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3091)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
         at java.awt.Container.dispatchEventImpl(Container.java:1568)
         at java.awt.Window.dispatchEventImpl(Window.java:1581)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    Also, enclosed is my modified DefaultCellEditor class. Your input will be greatly appreicated. Thanks.
    class NewDefaultCellEditor extends DefaultCellEditor {
    public NewDefaultCellEditor(JTextField jTextField) {
    super(jTextField);
    this.setClickCountToStart(1);
    jTextField.addFocusListener(new FocusAdapter() {
    JTable tbl;
    int row;
    int column;
    public void focusGained(FocusEvent e) {
    tbl = (JTable)((JTextField)e.getSource()).getParent();
    row = tbl.getEditingRow();
    column = tbl.getEditingColumn();
    public void focusLost(FocusEvent e) {
    /*** Put validation here, execute the following if failed ***/
    tbl.editCellAt(row, column);
    ((JTextField)e.getSource()).requestFocus();

    Your use in a JTable isn't too clear to me, but I feel you're overthinking the basic requirement:
    I have an extended JComboBox which is meant to display its information only. Thus it
    - does not allow any selection
    - shows the first item of the list in the TextField only and not once more in the listI don't see the need for duplicating the model and using a popup menu listener.
    import java.awt.Component;
    import javax.swing.*;
    public class DisplayOnlyComboBoxDemo {
      public static void main(String[] args) throws Exception {
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            new DisplayOnlyComboBoxDemo().makeUI();
      public void makeUI() {
        JFrame frame = new JFrame();
        frame.add(new DisplayOnlyComboBox("One", new String[]{"Two", "Three", "Four", "Five"}));
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    class DisplayOnlyComboBox extends JComboBox {
      private String firstItem;
      public DisplayOnlyComboBox(String firstItem, String[] items) {
        super(items);
        this.firstItem = firstItem;
        setRenderer(new DefaultListCellRenderer() {
          @Override
          public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
            super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            if (index == -1) {
              setText(DisplayOnlyComboBox.this.firstItem);
            return this;
    }db

Maybe you are looking for

  • Database Valut

    Hi, I have few questions regarding database vault. Please see if anyone can help me in these. 1-What are the logging dynamics? 2-Does it support IP based filtration with multiple IPs? 3-Does it support SINGLE ROW/COLUMN reporting on query against Rul

  • Creating Drill Down report in reports 6i

    Hello All, how to create a drill down report in 6i. the requirement is i have a report which displays the summary of grades like Grade count of jobs A 10 B 25 C 5 etc. when the user clicks on the Grade the details of the count has to be displayed...h

  • Premiere to SpeedGrade 7.1 Direct Link Crash

    When opening an adobe premiere project in Speed Grade 7.1, the application crashes.  This crash also occurs when using the Direct Link feature in Adobe Premiere CC. Speed Grade will open and function normaily apart from this process. I am aware of th

  • PS CS4 64 - crashed by Wacom in Windows 7

    I just resolved a crashing problem that affects Photoshop CS4 64-bit under Windows 7. Looking at some other treads here, I went into the Event Viewer and looked at application events. The log reported the Wacom driver for my tablet as the crash initi

  • P67a-GD65 Bios 4.39 Turbo-boost problem

    Hi, i just finished overclocking my system and it's working great all but for one thing. I can't enable turbo-boost anywhere in bios. I have to do it in the settingsmenu in Realtemp every time i restart the computer, its getting annoying. Any tips? S