JTable in Form

Dear friends
I searched how can I make a gride (like excel gride) in oracle form and I'll have the followin control : sort on column , resize column and move column between eachother, then I read I must use JTable with Bean Area in oracle form( I'm not sure is it correct or not), But I couldn't find how I can do it.
If I can do it with JTable and Bean Area please tell me step by step the method.
Thanks alot

I don't know how to run java console, but on the form I get When New Record Instance from the beginning of form running.Nothing else.
Where is the Java console? How can I run it?
When I run the form and try to open sun java console from internet explorer, explorer closes.
While form is running before update I opened java.exe, it closes also.
Java Console things
Oracle JInitiator: Version 1.3.1.22
Using JRE version 1.3.1.22-internal Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\JALEO
User has overriden browser's proxy settings.
Proxy Configuration: no proxy
JAR cache enabled
Location: C:\Documents and Settings\JALEO\Oracle Jar Cache
Maximum size: 50 MB
Compression level: 0
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
q: hide console
s: dump system properties
t: dump thread list
x: clear classloader cache
0-5: set trace level to <n>
Loading http://jaleo.sarar.com.tr:8890/forms/java/frmall_jinit.jar from JAR cache
java.io.FileNotFoundException: File not found: http://jaleo.sarar.com.tr:8890/forms/java/icons.jar
     at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
     at oracle.jre.protocol.jar.HttpUtils.followRedirects(Unknown Source)
     at oracle.jre.protocol.jar.JarCache$CachedJarLoader.download(Unknown Source)
     at oracle.jre.protocol.jar.JarCache$CachedJarLoader.load(Unknown Source)
     at oracle.jre.protocol.jar.JarCache.get(Unknown Source)
     at oracle.jre.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
     at oracle.jre.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
     at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
     at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
     at sun.misc.URLClassPath$2.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.misc.URLClassPath.getLoader(Unknown Source)
     at sun.misc.URLClassPath.getLoader(Unknown Source)
     at sun.misc.URLClassPath.getResource(Unknown Source)
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at oracle.ewt.util.FocusUtils.<clinit>(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.<clinit>(Unknown Source)
     at oracle.ewt.laf.oracle.OracleLookAndFeel._initCommonFixedDefaults(Unknown Source)
     at oracle.ewt.laf.oracle.OracleLookAndFeel._getCommonDefaults(Unknown Source)
     at oracle.ewt.laf.oracle.OracleLookAndFeel._getIndexedDefaults(Unknown Source)
     at oracle.ewt.laf.oracle.OracleLookAndFeel.getDefaults(Unknown Source)
     at oracle.ewt.lwAWT.BufferedApplet.getUIDefaults(Unknown Source)
     at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
     at oracle.ewt.swing.JBufferedApplet.<init>(Unknown Source)
     at oracle.forms.engine.Main.<init>(Unknown Source)
     at java.lang.Class.newInstance0(Native Method)
     at java.lang.Class.newInstance(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
WARNING: Unable to cache http://jaleo.sarar.com.tr:8890/forms/java/icons.jar
Loading http://jaleo.sarar.com.tr:8890/forms/java/frmwebutil.jar from JAR cache
Loading http://jaleo.sarar.com.tr:8890/forms/java/jacob.jar from JAR cache
Loading http://jaleo.sarar.com.tr:8890/forms/java/fjtable.jar from JAR cache
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet version is : 10.1.2.0
SET_DECIMAL_SEPARATORS:.,
SET_DATE_FORMAT:dd/MM/yyyy
SET_NUM_FORMAT:#0.00
SET_INT_FORMAT:##########
SET_IMAGE_SIZE:200,-1
INIT:false
*** raz ***
SETSEPARATOR:^
SETARRAYSIZE:4,5
ArraySize : 4 columns 5 rows
SETHEADER:ROWID^^DEPTNO^^DNAME^^LOC
SET_COLS_TYPE:CHAR^INTEGER^CHAR^CHAR
SETDATA:AAAMjTAAEAAAAEEAAA^10^ACCOUNTING^lDAHO
SETDATA:AAAMjTAAEAAAAEEAAB^20^RESEARCH^DALLAS
SETDATA:AAAMjTAAEAAAAEEAAC^30^SALES^CHICAGO
SETDATA:AAAMjTAAEAAAAEEAAD^40^OPERATIONS^BOSTON
SETDATA:AAAMjTAAEAAAAEHAAA^50^INFORMATION^LA
SET_CELL_PROPERTY:ROWID|ENABLE|false
prop=ENABLE value:false
SET_CELL_PROPERTY:ROWID|WIDTH|5
prop=WIDTH value:5
SET_CELL_PROPERTY:ROWID|RESIZE|false
prop=RESIZE value:false
SET_CELL_PROPERTY:HIREDATE|BG_COLOR|230,230,255
prop=BG_COLOR value:230,230,255
Colulmn: HIREDATE not found. Unable to set property
SET_CELL_PROPERTY:SAL|BG_COLOR|230,255,255
prop=BG_COLOR value:230,255,255
Colulmn: SAL not found. Unable to set property
SET_CELL_PROPERTY:EMPNO|ENABLE|FALSE
prop=ENABLE value:FALSE
Colulmn: EMPNO not found. Unable to set property
SET_CELL_PROPERTY:EMPNO|FG_COLOR|100,100,100
prop=FG_COLOR value:100,100,100
Colulmn: EMPNO not found. Unable to set property
SET_CELL_PROPERTY:EMPNO|FONT|Tahoma|12|BI
prop=FONT value:Tahoma
Colulmn: EMPNO not found. Unable to set property
SET_CELL_PROPERTY:EMPNO|WIDTH|50
prop=WIDTH value:50
Colulmn: EMPNO not found. Unable to set property
SET_CELL_PROPERTY:EMPNO|MIN_WIDTH|40
prop=MIN_WIDTH value:40
Colulmn: EMPNO not found. Unable to set property
SET_CELL_PROPERTY:EMPNO|MAX_WIDTH|100
prop=MAX_WIDTH value:100
Colulmn: EMPNO not found. Unable to set property
SET_ROW_PROPERTY:HEIGHT|80
SET_CELL_PROPERTY:PHOTO|WIDTH|200
prop=WIDTH value:200
Colulmn: PHOTO not found. Unable to set property
SETBOUNDS:10,10,600,200
x=10 y=10 w=600 h=200
SETTITLE:Content of DEPT table
SETHEADBG:0,130,255
SETHEADFG:255,255,102
SETDATABG:255,255,255
SETUPDATE:TRUE
SHOW:FALSE
seperate=FALSE
Exception occurred during event dispatching:
java.lang.NoSuchMethodError
     at oracle.forms.fd.FJTable$2.mousePressed(FJTable.java:1252)
     at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)
     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp.mousePressed(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy.processEventImpl(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Exception occurred during event dispatching:
java.lang.NoSuchMethodError
     at oracle.forms.fd.FJTable$2.mousePressed(FJTable.java:1252)
     at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)
     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp.mousePressed(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy.processEventImpl(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)

Similar Messages

  • Forms configuration : JTable within Forms

    in 10g form with jre6 ver 1.6.0_33 I'm not able to figure out what creates the error while Implementation Class property
    Importing Class oracle.forms.fd.FJTable...
    Exception occurred: java.lang.ClassNotFoundException: oracle.forms.fd.FJTable
    the step that I've done is :
    Copy the fjtable16.jar file in the /forms/java directory
    Edit the /forms/server/formsweb.cfg file to add the jar file to the archive and archive_jini tags

    actually I've both the file there fjtable16.jar & fjtable.jar in
    \DevSuiteHome_1\forms\java\fjtable.jar
    shall I remove fjtable.jar

  • Working with JTable in intelliJ  in forms

    hi,
    iam trying to create a JTable using forms,can anyone pls tell me how to add rows and columns to it ?

    Hi Alice,
    I really don't think the problem is using LC Designer 8. We have several forms that were developed in LC Designer 8 (with FormCalc and Javascript), that still function in Acrobat/Reader 9.3.1.
    There are two potential issues. The first is the most likely.
    In the new installation of Reader 9.3.1, JavaScript is turned off. See this blog and sample: http://blogs.adobe.com/livecycle/2009/02/adobe_reader_disabled_javascri.html
    If you send the sample to the agency, a warning will appear if they open it and Javascript is turned off. When they turn javascript back on in the preferences, then your form should work again.
    The second issue can be a little more trouble. Adobe have introduced a new Javascript Blacklist Framework in Acrobat/Reader 9.3.1, which can disable FormCalc and JavaScript if it contravenes the framework. See these links:
    http://kb2.adobe.com/cps/504/cpsid_50431.html
    Managing JavaScript Execution in the Acrobat Family of Products
    As I say, unless your FormCalc is trying to access external resources, I suspect that Javascript is turned off in Reader. I don't think you have to upgrade Acrobat/LC Designer.
    Hope that helps,
    Niall

  • JTable problem in master detail form

    I've created a master detail form. There is only one Navigation bar for both master and detail. Detail has a JTable component. JTable doesn't get focus when it doesn't have any row and I am uanble to insert new rows. To cope with this problem I've added two new buttons in Navigation Bar to travers to the next and previous iterBinding.
    When I start my form cursor apperas in the first field of master view when I press Next Button nothing happens ( Status Bar should show the next iterbinding/view). I've addes some debug mesgs in iterBindingChanged method of NavitaionBar class and it seems by looking the mesgs that detail/Jtable's iterBinding get focus two times but at last focus has been returned to the master iterBinding.
    Is there any suggestion to solve this problem.
    Regards
    Aamir

    Hi,
    I'm using 1.4.0 for my JClient and, due to the improved focus management provided in the new JDK, I am able to properly manage master-details configuration with only one navigation bar (of course, the JTable must be able to receive the focus, but this also is much easier in 1.4.0...)
    Nevertheless, the solution I found is quite complex and I would happily discard it.
    If you could find a solution that works "naturally" on frames with only one navigation bar, it would be great! I think that the buttons in the nav bar should apply to the "current" iterator binding (the iterator binding for the control having the focus).
    Thanks,
    Adrian

  • JTable with JPanel form as cell renderer/editor

    I have a JTable that uses a custom cell editor/renderer. The cell editor/renderer is a JPanel form with labels and text panes. As the user edits the information, I adjust the table row height (setRowHeight) and the JPanel layout manager updates the layout on the cell editor. This all seems to work fine. However, when the user exists the cell and the cell renderer is shown, it has the correct new row height but has not been correctly layed-out for the new row height. How do I force my cell renderer to be re-layout after the editor closes?

    That does not seem to work. I have done the following:
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int r, int c)
    this.table = (EditorTable) table;
    row = r;
    column = c;
    if (isSelected)
    setBackground (Preferences.selectedRowBgColor);
    else
    setBackground (formBg);
    // constructs the panel components
    setCellValue (value);
    revalidate();
    return (this);

  • JDev902: how open form with empty JTable?

    Background: Using the wizard I have created a number of JClient forms pulling their data from a BC-layer. However, some forms fill only very slowly because of the large number of rows of the underlying tables. Sometimes it would be better to open a form with an empty JTable and let the user formulate a query and pull in the desired data.
    Question: How do I open a form without automatically filling its JTable from the BC-layer? The old method of setting "...WHERE 1 = 0" seems rather - well - old! Is there a more elegant way?
    Thanks for any help!
    Sten Jones

    You can bring up the panel that the JTable is contained in without executing the query on it (remove executeQuery()) call. See JClient component demo on the JDeveloper HowTo pages on how to detail data-binding and query execution. Basically what these panels do is not setup the UI till it's displayed and then perform the binding. You can take it a step further by also not executing the query and executing it only after the user says so.
    Another way would be to "force" the startup to be in find mode. So, instead of executing query for the panels, you may want to set the table in find mode so that the user is able to enter query right up, when the UI comes up.

  • JTable Javabean in Forms 6i (6.0.8.11.3)

    All,
    Am trying to show up a JTable in forms6i module. I had my .jar files and java file copied to right places, Included a BEANAREA item to a DBlock, set the implementation class pointing to the proper class.
    When i tried to open the beanarea item in my layout. The forms is crashing.
    1) Is there a specific patch for forms 6i do i have to install ??
    2) Forms 9i/10g is working fine for the above example. Is there a diff way for forms 6i ??
    If somebody could pour some insights on this.. then that would be much much appreciated..
    Thanks
    - Karthik Dhinakaran

    France / Gerd
    Thanks for the replies.
    The intention is to bring a grid kind of control in forms. So that multiple selection of rows can be made for a specific operation.
    France - Thanks for the idea to look at the java console. Will try that and post it here.
    2 years back , when working with GE, Indiana. We used a similar technique. I thought of marking a difference in the form which we work day to day. Also it's very useful in handling the multiple items. I have the code, it's workign in forms 9i/10g but i need to implement the same in forms 6i.
    Your feedback will be much much much appreciated. Infact will be greatful !
    Message was edited by:
    [email protected]

  • Is there any form that works like Jtable that can be written into the html

    Is there any form that works like Jtable that can be written into the html or jsp format?
    <INPUT TYPE="SUBMIT" NAME="command" VALUE=""> refer to a Sumbit Button.
    There no such thing below "I think"but just dreaming
    Is there something like
    <INPUT TYPE="TABLESUBMIT" NAME="customer" VALUE={rowcolumn(1,3,"peter"),rowcolumn(last,"name","jane")}> ......

    Keep dreaming. As long as you are using HTML you are stuck with
    all of its limitations. Among these is the lack of a JTable.
    You have several options:
    1) Use an HTML <TABLE>. For plain text you just put the
    text between <td></td> tags. For input you put the input
    as <td><input...></td>.
    2) Extend #1 by creating your own object to draw the table.
    You can do this in either Java or JavaScript. There are several
    examples on the internet of how to do this. Some even include
    sorting by clicking the column headings.
    3) If you really want to use a JTable then you can write a JApplet
    and put it on your JSP page.

  • JTable bean in forms

    I would like to display JTable based bean in Oracle Forms 10g but I get:
    *** VBean null PropertyManager for id = FOREGROUND
    *** VBean Got FOREGROUND = null
    *** VBean null PropertyManager for id = BACKGROUND
    *** VBean Got BACKGROUND = null
    *** VBean Setting debugMode to ALL
    *** VBean Setting beanName to plusplus.PPCalendar
    *** plusplus.PPCalendar Registering properties
    *** plusplus.PPCalendar     int pWidth
    *** plusplus.PPCalendar     int pDebugGraphicsOptions
    *** plusplus.PPCalendar     int pHeight
    *** plusplus.PPCalendar     boolean pOpaque
    *** plusplus.PPCalendar     javax.swing.InputVerifier pInputVerifier
    *** plusplus.PPCalendar     Failed to introspect class: class plusplus.PPCalendar java.lang.NullPointerExceptionPPCalendar's code:
    public class PPCalendar extends JPanel
      private JTable table;
      private DefaultTableModel model;
      private JScrollPane jsp;
    public PPCalendar() {
       super();
       model = new DefaultTableModel( new String[] [] {  {"1x1", "1x2"},  {"2x1", "2x2"}}, new String [] {"First", "Second"});
       table = new JTable(model);
       jsp = new JScrollPane(table);
       jsp.setAutoscrolls(true);
       this.add(jsp);
       this.setVisible(true);
      public void setHead(String nes) {
        String val1 = (String) model.getValueAt(0,0);
        System.out.println("val1: " + val1);
      public String getHead() {
        return (String) model.getValueAt(0,0);
      }Setting property (     fbean.set_property('tb.ptable', 1, 'head', 'Blah');) fails, but I can set properties (introspection still fails) if I try something similar with:
    package plusplus;
    //import java.awt.Panel;
    //import java.awt.Label;
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    public class Simple extends JPanel  {
      private JLabel naziv = new JLabel();
      public Simple() {
        try {
          jbInit();
        } catch(Exception e) {
          e.printStackTrace();
      private void jbInit() throws Exception {
        naziv.setText("XXX");
        this.add(naziv, null);
      public void setNaziv(String tekst) {
        naziv.setText(tekst);
    }What am I doing wrong? Are there some "more advanced" swing based bean examples?
    Is there some kind of documentation on oracle.ewt.* and Dynamic Bean Manager?

    The problem is that you're extending JPanel - the issue is not your fault (or ours for that matter) it's a problem in the base JPanel class which causes a NPE when introspecting the properties that it exposes because it does not conform to the JavaBeans Spec.
    We've put a WorkAround into the FBean code in Forms 10.1.2 but for the moment you will have to extend Panel rather than JPanel and all should be ok - this should make no difference to the operation of the Bean.
    Another option would be to write a BeanInfo class for your Bean and prevent the exposure of the problem property (inputMap) that way.

  • How to get String form java JTable row?

    Hello everybody,
    Can anybody tell me how to get value as String form java JTable row?

    I found solution:
            table.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent evt) {
                    if (evt.getClickCount() == 2){
                        int col = table.getSelectedColumn();
                        int row = table.getSelectedRow();
                        String tableUrl = ((String)table.getModel().getValueAt(row, col));
                        ur.openUrl(tableUrl);
            });

  • JTable interferes with form scrolling

    Hi,
    I have a dialog with a scrollpane around a form which has many controls. The form gets a vertical scrollbar and I want to scroll the form up and down.
    This works fine but I have several tables on the form which if my mouse is over the jtable it (I suppose) tries to scroll the jtable - even though there is no vertical scrollbar on the table to scroll.
    How can I get it to not try to scroll the table and instead have the form (jpanel) scroll up and down - like it does if my mouse is over the panel itself.
    thanks!
    Greg

    try removing the mouseWheelListeners from the various table scrollpanes
    e.g.
    sp.removeMouseWheelListener(sp.getMouseWheelListeners()[0]);

  • Export data form JTable to excel

    Hi! i want to export data from JTable to excel.
    could you help me please?

    Despite your question looks doesn't seems to be very complex, I feel pity I am a newbie can not offer you the answers. I am more familiar with exporting data to excel in C#. I've worked with a Data Grid control, just like the JTable. Here are some C# code example. Maybe you can take them as a kind of reference.
    ExportToExcelML exporter = new ExportToExcelML(this.ketticGridView1);
    exporter.HiddenColumnOption = Kettic.WinForm.UI.Export.HiddenOption.DoNotExport;
    exporter.ExportVisualSettings = true;
    exporter.SheetMaxRows = ExcelMaxRows._1048576;
    exporter.SheetName = "NewSheet";
    exporter.SummariesExportOption = SummariesOption.DoNotExport;
    string fileName = "C:\\ExportedGridData1.xls";
    exporter.RunExport(fileName);

  • Is there some way to put an arrow column 0 in a JTable?

    Hi,
    I'd like to configure my JTable something like "grids" in other languages like Delphi. There is a column 0 with a black arrow. When the user changes the line, the arrow is automattically updated to the actual line.
    Is there some property of JTable for this or I have to create it manually?

    The concepts of Delphi TDBGrid or TStringGrid are:
    1) first column is very small, sufficient size to put a little black right arrow
    2) the column above is not a normal column, the user can't go to there, can't click there
    3) the color of this column is the same color that column header
    4) when you call the frame/form with a grid, the arrow is positioned in line number 1
    5) if user clicks to select, for example, line 3, or a cell in a line 3, the arrow goes from line 1 to line 3. Then, the user easily know what's the actual line.
    With JTable default behaviour, with no line selection enabled, you only see a weak mark around the actual cell. Then, if the user doesn't look with big attention, he doesn't know what the actual cell/line.

  • Help with JTable - content of cell disappears when selected

    Hello,
    I have a jTable and I have created a custom cell renderer. It does what it's supposed to do (which is set the background color of all cells with null or "" value to red - as an indication to the user that b4 proceeding he/she has to fill in this cells). The problem is that when I select a red cell, it becomes white and the text value it contains disappears. When I double click I can start typing in a new value.
    I would appreciate any hint why this happens? Ideally I would like the cell to keep its color when clicked or double-clicked and its value, and only when i'm done editing its content and it's not null or empty string to become white.
    I'm including majority of my code (some automatically generated code from Netbeans is not included).
    Thank you very much,
    Laura
    public class DataNormalisation extends javax.swing.JFrame {   
        JTextArea txt=new JTextArea();
        public Object[][] DataSummary;
        public Vector<String> colName;
        MainF p;
        String[] ExpNames;
        /** Creates new form DataNormalisation */
        public DataNormalisation(String[] EN, MainF parent) {
            p=parent;
            ExpNames=EN;
            colName= new Vector<String>();
            colName.add("Sample Name");
            colName.add("Replicate Group");
            DataSummary=new Object[ExpNames.length][2];
            for (int i=0;i<ExpNames.length;i++){
                DataSummary[0]=ExpNames[i];
    initComponents();
    this.jTable1.getTableHeader().setReorderingAllowed(false);
    TableColumn column = jTable1.getColumnModel().getColumn(1);
    column.setCellRenderer(new CustomTableCellRenderer());
    private void initComponents() {
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new JTable (new DataModel());
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Data Normalisation");
    jTable1.setAutoCreateRowSorter(true);
    jTable1.setCellSelectionEnabled(true);
    jScrollPane1.setViewportView(jTable1);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    // End of variables declaration
    class DataModel extends AbstractTableModel {       
    class TML implements TableModelListener{
    public void tableChanged (TableModelEvent e){
    txt.setText(""); // Clear it
    for (int i=0;i<DataSummary.length; i++){
    for (int j=0; j<DataSummary[0].length;j++){
    txt.append(DataSummary[i][j] + " ");
    txt.append("\n");
    public DataModel(){
    addTableModelListener(new TML());
    @Override
    public void setValueAt(Object val, int row, int col){
    DataSummary[row][col]=val;
    fireTableDataChanged();
    @Override
    public boolean isCellEditable(int row, int col){
    return (col != 0);
    public int getRowCount(){
    return DataSummary.length;
    public int getColumnCount(){
    return colName.size();
    public Object getValueAt(int row, int column){   
    return DataSummary[row][column];
    public String getColumnName(int col) {           
    return colName.get(col);
    class CustomTableCellRenderer extends DefaultTableCellRenderer {       
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
    boolean hasFocus, int row, int column) {
    Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    if (value == null || value.equals("")) {
    cell.setBackground(Color.red);
    } else cell.setBackground(Color.white);
    return cell;

    Ideally I would like the cell to keep its color when clicked or double-clicked Not sure why is changes color when you click on the cell.
    But when you double click the editor is invoked, which is a JTextField and its background is white by default.
    The code you posted doesn't help because its not executable.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    And don't post NetBeans generated code, because we don't use IDE to write GUI code.
    Also, why did you create a custom TableModel. The DefaultTableModel will store your data for you.

  • JTable, JScrollPane, and JinternalFrame problems.

    I have this internal frame in my application that has a scrollpane and table in it. Some how it won't let me selelct anything in the table. Also it scrolls really weird. There's a lot of chopping going on. Here's my code for the internal frame:
    public class BCDEObjectWindow extends javax.swing.JInternalFrame{
        private Vector bcdeObjects = new Vector();
        private DefaultTableModel tModel;
        public BCDEObjectWindow(JavaDrawApp p) {
            initComponents();
            this.setMaximizable(false);
            this.setClosable(false);
            this.setIconifiable(true);
            this.setDoubleBuffered(true);
            objectTable.setPreferredScrollableViewportSize(new Dimension(500, 70));
            listScrollPane.setColumnHeaderView(new ObjectWindowHeader());
            pack();
            this.setVisible(true);
            parent = p;
            getAllBCDEFigures();
            setPopupMenu();
            tModel = (DefaultTableModel) objectTable.getModel();
            objectTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        public void getAllBCDEFigures() {
            bcdeObjects.removeAllElements();
            int i;
            for (i = 0; i < bcdeObjects.size(); i++) {
                tModel.removeRow(0);
        public void addBCDEFigure(BCDEFigure b) {
            bcdeObjects.add(b);
            tModel.addRow(new Object[]{b.BCDEName, "incomplete"});
        public void changeLabelName(BCDEFigure b) {
            if (bcdeObjects.contains(b)) {
                int index = bcdeObjects.indexOf(b);
                tModel.removeRow(index);
                tModel.insertRow(index, new Object[]{b.BCDEName, "incomplete"});
        public void removeBCDEFigure(BCDEFigure b) {
            int index = 0;
            if (bcdeObjects.contains(b)) {
                index = bcdeObjects.indexOf(b);
                bcdeObjects.remove(b);
                tModel.removeRow(index);
        public void removeAllBCDEFigures(){
            int i;
            for (i = 0; i < bcdeObjects.size(); i++) {
                tModel.removeRow(0);
            bcdeObjects.removeAllElements();
        /** 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() {
            jPanel1 = new javax.swing.JPanel();
            listScrollPane = new javax.swing.JScrollPane();
            objectTable = new javax.swing.JTable();
            getContentPane().setLayout(new java.awt.FlowLayout());
            setBackground(new java.awt.Color(255, 255, 255));
            setIconifiable(true);
            setTitle("BCDE Objects");
            listScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
            listScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
            listScrollPane.setPreferredSize(new java.awt.Dimension(250, 150));
            objectTable.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {
                new String [] {
                    "Name", "Status"
                boolean[] canEdit = new boolean [] {
                    true, false
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit [columnIndex];
            objectTable.setColumnSelectionAllowed(true);
            listScrollPane.setViewportView(objectTable);
            jPanel1.add(listScrollPane);
            getContentPane().add(jPanel1);
            pack();
        }// </editor-fold>
        // Variables declaration - do not modify
        private javax.swing.JPanel jPanel1;
        private javax.swing.JScrollPane listScrollPane;
        private javax.swing.JTable objectTable;
        // End of variables declaration
    }and this is how i create the object in my JFrame:
    bcdeOW = new BCDEObjectWindow(this);
            bcdeOW.setLocation(400, 0);
            if (getDesktop() instanceof JDesktopPane) {
                ((JDesktopPane)getDesktop()).setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
                ((JDesktopPane)getDesktop()).add(bcdeOW, JLayeredPane.PALETTE_LAYER);
            } else
                getDesktop().add(bcdeOW);Any help would be great. Thanks a lot.

    Rajb1 wrote:
    to get the table name to appear
    create a scollpane and put the table in the scrollpane and then add the the scollpane to the component:
    //declare
    scrollpane x;
    //body code
    scrollpane x - new scrollpane();
    table y = new table();
    getContentPane().add(x(y));What language is this in, the lambda calculus -- add(x(y))!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Maybe you are looking for

  • SAP Client to the SAP Server: internal Error (-1102)[Message 131-183]

    Hi, We are using Windows 2008 Server R2, SQL 2008 Standard, SAP B1 8.81 PL08. When we trying to connect SAP Client to the SAP Server. There has internal Error (-1102) occurred. We can view the database on client, but we always get the same error mess

  • Error during SC creation - Jurisdiction code could not be determined

    Hi All, For testing purpose , I have set up one user id. While creating SC with that ID, I  am getting one error, it says "Jurisdiction code could not be determined ". Plant , company code everything enetred in the SC is perfect. On another hand, I c

  • Matrix-style lines on DVD display

    Is anyone acquainted with this? Vertical lines in the style of The Matrix appear when a DVD is played but only on the image. For example, the lines do not appear in the border if the image is set to wide screen or if the video is watched in a window

  • OSB: Dynamic XQuery & Dynamic Validate against resource

    Hi all, I've a proxy where I select a dynamic XQuery and I would like to validate the result against a given schema that is different depending on the selected dynamic xquery. The result of the dynamic XQuery is an xml resource that is valid against

  • System upgrade failure

    I have multilib and multilib-testing enabled, as well as the default testing repos enabled. An attempted upgrade (pacman -Syu) this morning produced this: :: Starting full system upgrade... :: Replace heimdal with core/krb5? [Y/n] Y resolving depende