Problems with JTable Renderer

I have a problem with applying a custom renderer. I know the renderer works so thats not the problem. If I do like this:
DefaultTableModel aDefaultTableModel = new DefaultTableModel(data, columnNames);
it works. But if I do like this:
DefaultTableModel aDefaultTableModel;
aDefaultTableModel.setDataVector(data, columNames);
is doesn't, why?

I think maybe it's not the renderer at all. It may be my custom TableModel thats causing problems. Now this doesn't work:
private JTable aTable;
private CustomTableModel aTableModel;
public MyProgram() {
aTableModel = new CustomTableModel();
aTable = new JTable(aTableModel);
aTableModel.setData(data, columnNames);
private class CustomTableModel {
private String[] columnNames = null;
private Object[][] data = null;
public CustomTableModel() {
columnNames = new String[0];
data = new Object[0][0];
... snip
public void setData(Object[][] data, String[] columnNames) {
this.data = data;
this.columnNames = columnNames;
fireTableDataChanged();
... snip
Now, why doesn't that setData method work??

Similar Messages

  • A problem with JTable

    Hi !
    I have a problem with JTable - would like to use this component as a simple list of rows taken from a database : don't want to be able select or set a focus to a column - want only to be able select and set focus to a row ( just like in the menus). How to disable "focusability" for a cell with JTable ? Could You help me ?
    thnx in advance

    The Border is changed by the renderer, depending on whether the cell has focus or not. So you will need to create custom renderers without a Border. Something like:
    class NoBorderRenderer extends DefaultTableCellRenderer
         public Component getTableCellRendererComponent(
              JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
              super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
              setBorder(null);
              return this;
    }

  • Selection Problem with JTable

    Hello,
    i have a selection problem with JTable. I want to allow only single cell selection and additionally limit the selection to the first column.
    I preffered the style from MS Outlook Express where you can select the email accounts to edit.
    It is a table like this:
    Account name  |   Type  |   ...
    --------------|---------|---------------------
    Hotmail       |   POP3  |
    GMX           |   IMAP  |The selection should be only avaibable at 'Hotmail' or 'GMX' - not at 'POP3', 'IMAP' or as complete row selection.
    Please help me!
    Thanks.
    Warlock

    Maybe this will helpimport java.awt.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        String[] head = {"One", "Two"};
        String[][] data = {{"R1-C1", "R1-C2"}, {"R2-C1", "R2-C2"}};
        JTable jt = new JTable(data, head);
        jt.getColumnModel().setSelectionModel(new MyTableSelectionModel());
        content.add(new JScrollPane(jt), BorderLayout.CENTER);
        jt.setCellSelectionEnabled(true);
        jt.setRowSelectionAllowed(false);
        jt.setColumnSelectionAllowed(false);
        setSize(300, 300);
        setVisible(true);
      public static void main(String[] arghs) { new Test3(); }
    class MyTableSelectionModel extends DefaultListSelectionModel {
      public void setSelectionInterval(int index0, int index1) {
        super.setSelectionInterval(0, 0);
    }

  • Another problem with JTable

    Hi,
    I have encountered a problem with JTable, i am trying to display some 15 columns and their values , one of the columns value is null, then the JTable is not displaying its value from this column(which is with null value) onwards.
    Can anybody assiss me in this matter.
    Regards
    khiz_eng

    I don't know If I can fix your problem, but
    I know just that it works on my PC.... It's very very
    slow... I don't know how to insert PageSetUp option... I have to study the problem.....
    However I don't think it's a hard problem....
    I want ask to you if you have found some problems when you are in Editing mode in a cell.....
    in the jdk1.2 version I could save while was in editing mode using the editingStopped method.
    It permit to update all data .... also the data in the cell I was editing.
    in the jdk 1.3 if I use this method It doesn't work properly... It maybe destroy the content object in the Cell..... because I'm able to print all the table except the editing cell (it throw an exception...)
    What's changed????
    I don't know...
    Can u help me?

  • Problem with JTable and JPanel

    Hi,
    I'm having problems with a JTable in a JPanel. The code is basicly as follows:
    public class mainFrame extends JFrame
            public mainFrame()
                    //A menu is implemeted giving rise to the following actions:
                    public void actionPerformed(ActionEvent evt)
                            String arg = evt.getActionCommand();
                            if(arg.equals("Sit1"))
                            //cells, columnNames are initiated correctly
                            JTable table = new JTable(cells,columnNames);
                            JPanel holdingPanel = new JPanel();
                            holdingPanel.setLayout( new BorderLayout() );
                            JScrollPane scrollPane = new JScrollPane(holdingPanel);
                            holdingPanel.setBackground(Color.white);
                            holdingPanel.add(table,BorderLayout.CENTER);
                            add(scrollPane, "Center");
                            if(arg.equals("Sit2"))
                                    if(scrollPane !=null)
                                            remove(scrollPane);validate();System.out.println("ScrollPane");
                                    if(holdingPanel !=null)
                                            remove(holdingPanel);
                                    if(table !=null)
                                            remove(table);table.setVisible(false);System.out.println("table");
                            //Put other things on the holdingPanel....
            private JScrollPane scrollPane;
            private JPanel holdingPanel;
            private JTable table;
    }The problem is that the table isn't removed. When you choose another situation ( say Sit2), at first the table apparently is gone, but when you press with the mouse in the area it appeared earlier, it appears again. How do I succesfully remove the table from the panel? Removing the panel doesn't seem to be enough. Help is much appreciated...
    Best regards
    Schwartz

    If you reuse the panel and scroll pane throughout the application,
    instantiate them in the constructor, not in an often-called event
    handler. In the event handler, you only do add/remove of the table
    on to the panel. You can't remove the table from the container
    which does not directly contain it.
    if (arg.equals("Sit2")){
      holdingPanel.remove(table);
      holdingPanel.revalidate();
      holdingPanel.repaint(); //sometimes necessary
    }

  • Problem with image rendering program

    I am trying to use a 3D image segmentation program called "ITK-SNAP" on Mac Mini (2013). However, when I loaded the image, half of the image is not showing. I have tried the program on OSX 10.8.5 and OSX 10.9.1 (same computer, just upgraded yesteday), and both OS gave me the same problem. I have also tried different versions of "ITK-SNAP", and that did not seem to help either. The specs for the Mac Mini is the following:
    Processor: 2.5 Hz Intel Core i5
    Memory 4GB 1600 MHz DDR3
    Graphics: Intel HD Graphics 4000 1024MB
    Software OSX 10.9.1 (13B42)
    I was able to use this program without a problem on an older Macbook Pro laptop (2009, with OSX 10.8.5). The specs for the laptop is the following:
    Porcessor: 2.4 Hz Intel Core 2 Duo
    Memory: 3GB 1067MHZ DDR3
    Graphics: NVIDIA GeForce 9400M 256MB
    Software OSX 10.8.5 (12F45)
    Does anyone have any suggestions on how to fix this? Is it necessary to reinstall some drivers?
    Thanks in advance.
    Edward

    The Nvidia GeForce GPU in the MacBook can handle the 3d. The HD4000 Intel in the Mini can't UNLESS you bump up your system RAM to 8Gb or 16Gb.
    Here's why. The Nvidia is a dedicated chip, and it doesn't rely solely on system RAM to operate. The Intel HD4000 does. The MORE system RAM you have, the MORE video RAM you'll have with the Intel chip. I have 16Gb and my VRAM is 1024Mb. I use Photoshop CS5 and CS6. With 4Gb RAM, I don't have enough VRAM for either to enable 3D drawing. With 512Mb VRAM (8Gb system RAM), CS5 would allow 3D, but only with software rendering, and CS6 wouldn't allow it at all. Once I put 16Gb in the Mini, BOTH allow 3D rendering with hardware.

  • Scrollbar problem with JTable.

    Hi,
    I have 45 columns in a JTable. Please remember this is customize, we can change the number of columns dynamically, at max they can be 2 columns.
    i was having a problem with display the columns names in my Frame. I posted at http://forum.java.sun.com/thread.jspa?threadID=5167358&messageID=9641265#9641265
    I got the solution. Thanks for that.
    But as i said these columns are customized.
    when i am having 2 columns in my JTable, table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF ); is behaving differently, it's not occupying the complete JFrame. Lots of space is left out beside these 2 columns.
    When i comment this line, then those 2 columns are occupying my complete Frame.
    these two colmns should occupy my complete Frame and if i select 45 columns i should get scroll bar at botton with complete column NAMES.
    Hope i am clear.
    My Snippet
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    public class SimpleTable extends JPanel {
        private boolean DEBUG = false;
        public SimpleTable() {
            super(new BorderLayout());
                        String[][] values = new String[10][];
            String[] columnNames = {
                                                                                    "First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian"
            Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)}
                        DefaultTableModel defaulttablemodel = new DefaultTableModel(data,columnNames);
            final JTable table = new JTable(defaulttablemodel)
                 public boolean isCellEditable(int row,int column)
                                  return false;
                        table.setPreferredScrollableViewportSize(new Dimension(500, 70));
                        //table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
                        JScrollPane scrollPane = new JScrollPane(table);
                        add(scrollPane);
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("SimpleTable");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            SimpleTable newContentPane = new SimpleTable();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Thank You camickr, it's serving my purpose.
    Just for a clarrification :
    table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
    table.setAutoscrolls(false);without using these lines also my purpose is serving.....then y do we need above two lines of code. r they necessary
    i mean, this snippet is sufficient.
    public boolean getScrollableTracksViewportWidth()
         return getPreferredSize().width < getParent().getWidth();
    }

  • Problems with JTable

    Hi All,
    I am facing some problems in JTable :
    1) How to remove all lines between cells, neither i should have column nor row lines....there should not be any lines between any cell at all.
    2) If i select a perticular cell, complete row is getting selected with a blue background, that should not happen at all.....row should not get select....
    3) How to make a cell non editable.
    Regards,
    Ravi

    1) Read the API. Check out the set??? methods until you fine what you want
    2) Read the API. Check out the methods that deal with row and column selection
    3) Override isCellEditable(...) method of JTable or DefaultTableModel

  • Problem with Placements rendering multiple times

    I am having a problem of portlets rendering more than once. Or more specifically,
    it appears placements are rendering more than once. Anyone have this problem.
    It seems to show its ugly head switching between VIEW and EDIT mode in portlets
    with Backing files. Here is the only output I get.
    <Mar 8, 2004 5:10:39 PM EST> <Warning> <netuix> <BEA-421534> <Expecting one placement
    got at least one more: username MYLOGIN placement
    Placement:
    placementId: 26004
    DesktopInstanceId: 22003
    PageInstanceId: 6004
    PlaceholderDefinitionId: 6010
    position: 1
    PortletInstanceId: 36007
    BookInstanceId: null location 1.>
    cheers
    andrew

    Hi Andrew,
    I am getting this kind of problem while using PortalVisitorManager::movePlaceableInstances()
    in my JPF code.
    It seems that one call resutls in adding a single portlet many times (8 times).
    The confusing part is that it should move a portlet instance from one location
    to other location but it adds new instances...
    did u get around with u'r problem, do u have some solution..
    any clue.....
    regards,
    Jitendra Kumar.
    "Andrew Clifford" clifforda.no.spam.comcast.net wrote:
    >
    I am having a problem of portlets rendering more than once. Or more specifically,
    it appears placements are rendering more than once. Anyone have this
    problem.
    It seems to show its ugly head switching between VIEW and EDIT mode
    in portlets
    with Backing files. Here is the only output I get.
    <Mar 8, 2004 5:10:39 PM EST> <Warning> <netuix> <BEA-421534> <Expecting
    one placement
    got at least one more: username MYLOGIN placement
    Placement:
    placementId: 26004
    DesktopInstanceId: 22003
    PageInstanceId: 6004
    PlaceholderDefinitionId: 6010
    position: 1
    PortletInstanceId: 36007
    BookInstanceId: null location 1.>
    cheers
    andrew

  • Problem with JTable in a JScrollPane

    Hello all,
    I have a problem using JTable, that the number of columns is very big,
    and the JScrollPane shows only vertical ScrollBar, isn't there any way to show a horizontal ScrollBar, to show the other columns without being bunched.
    Thanks in advance.

    table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );

  • Problem with JTable checkbox

    In my table I have a column of checkboxes. If user clicks any checkbox, the program will first check for some condition and pop out a warning dialog saying that "the action will change the current mode. are you sure you want to continue?". If user select "yes", some action are taken and the checkbox should be selected. Now the problem is that after user select "yes", the checkbox is not selected. (Same as when you press your mouse at a checkbox and then drag it out the checkbox cell, the actions are taken but the checkbox is not selected.)
    The code for the cell editor is as follows:
    public Component getTableCellEditorComponent(JTable table, Object value,
               boolean isSelected, int row, int column) {
             if (value instanceof ComboString) { // ComboString
               flg = COMBO;
               String str = (value == null) ? "" : value.toString();
               System.out.println("+++++++ " + row+" : "+column+"  flg: "+flg);
               return cellEditors[COMBO].getTableCellEditorComponent(table, str,
                   isSelected, row, column);
             else if (value instanceof Boolean) {                    
               flg = BOOLEAN;
               Boolean check = Boolean.getBoolean(value.toString());
                          // promptContinue returns true for continue, false for return; inside it a dialog box is popped for user selection "continue or not"
                          if(!promptContinue()){
                                return null;
               return cellEditors[BOOLEAN].getTableCellEditorComponent(table,
                   value, isSelected, row, column);
             

    Thanks. But my problem is not with stopping the editor, but with continuing the editor. Following is the code of getCellEditorValue()
    public Object getCellEditorValue() {
             switch (flg) {
             case COMBO:
               String str = (String) comboBox.getSelectedItem();
               return new ComboString(str);
             case BOOLEAN:
             case STRING:
               return cellEditors[flg].getCellEditorValue();
             default:
               return null;
                }I am not very sure whether it is the problem of cell editor or cell renderer, because it seems the code for continue condition is actually executed which is supposed to make the checkbox checked, but the result turns to be that the checkbox is not checked.

  • Problem with JTable and JComboBoxes in cells

    Hello,
    I've build a Table with static comboboxes in the first row. These comboboxes are static because they are used to filter the content of the table.
    I extended AbstractTableModel for the data handling and I use the DefaultCellRenderer for combobox handling.
    So far everything works fine. But if I gain focus to one combobox and then click to another cell (either table cell or another combobox) i receive a NullPointerException from within the component:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.adjustFocusAndSelection(Unknown Source)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         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 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.Window.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.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)The problem is, that no error is visible on client side! I just see the NullPointerException in my console but no GUI Errors occur.
    Actually I could leave the table as it is now because there are no obvious errors but I don't think its a good job to ignore exceptions.
    Does anyone see where this problem could come from????
    Do I have to extend the BasicTableUI somehow because the exception is thrown in there???
    Thanks for any help!
    Bye Jan

    Hi brad,
    I'm using eclipse and java1.4.2_06. Isn't it enough to write the program arguments to the run configuration in eclipse?!
    I tried that but it didn't work out, I get the same error msg. :(
    But I can say that whatever happens inside the UI, the exception is thrown before I receive a mouseClicked event on the table itself. I added some kind of dummy mouse listener to the table that only prints the events to the console. Is the cell renderer or cell editor using is own MouseAdapter?
    You said: ...consume the event so the table won't react....
    How could I catch this MouseInputHandler???
    Thanx!
    Jan

  • Problem with Firefox rendering using a jspx page

    Hello, your help will be very important for me, so please read this :
    this is the code of my jspx page :
    <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:af="http://xmlns.oracle.com/adf/faces"
         xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
         <jsp:directive.page contentType="text/html;charset=utf-8" />
         <f:view locale="#{locale.locale}">
              <!-- Load localized messages -->
              <f:loadBundle var="bundle" basename="localizedMessages" />
              <!-- Main document element -->
              <af:document title="#{bundle.account_bucket_title}">
                   <af:panelBorder>
                        <f:facet name="top">
                             <af:panelGroup>
                                  <!-- Top bar -->
                                  <jsp:directive.include file="includes/header.jspf" />
                                  <!-- Top menu -->
                                  <jsp:directive.include file="includes/MenuTop.jspf" />
                             </af:panelGroup>
                        </f:facet>
                        <f:facet name="bottom">
                             <af:panelGroup inlineStyle="position: relative; bottom:0px">
                                  <!-- Bottom menu -->
                                  <jsp:directive.include file="includes/MenuBottom.jspf" />
                             </af:panelGroup>
                        </f:facet>
                        <!--bucket details-->
                        <af:panelGroup layout="vertical"
                             inlineStyle="overflow:auto; height=88%; position:relative">
                             <af:objectSpacer width="100" height="20" />
                             <af:panelHeader text="#{bundle.account_bucket_title}" size="0" />
                             <af:objectSpacer width="100" height="20" />
                             <af:table emptyText="#{bundle.account_bucket_no_items}" var="item"
                                  value="" width="100%">
                                  <af:column sortable="true"
                                       headerText="#{bundle.account_bucket_bundle_table_col1}"
                                       headerNoWrap="true" formatType="text">
                                       <af:outputText value="" />
                                  </af:column>
                                  <af:column sortable="true"
                                       headerText="#{bundle.account_bucket_bundle_table_col2}"
                                       headerNoWrap="true" formatType="text">
                                       <af:outputText value="" />
                                  </af:column>
                                  <af:column sortable="true"
                                       headerText="#{bundle.account_bucket_bundle_table_col3}"
                                       headerNoWrap="true" formatType="text">
                                       <af:table emptyText="#{bundle.account_bucket_bucket_no_item}"
                                            var="item" value="" width="100%">
                                            <af:column sortable="true"
                                                 headerText="#{bundle.account_bucket_bucket_table_col1}"
                                                 headerNoWrap="true" formatType="text">
                                                 <af:outputText value="" />
                                            </af:column>
                                            <af:column sortable="true"
                                                 headerText="#{bundle.account_bucket_bucket_table_col2}"
                                                 headerNoWrap="true" formatType="text">
                                                 <af:outputText value="" />
                                            </af:column>
                                            <af:column sortable="true"
                                                 headerText="#{bundle.account_bucket_bucket_table_col3}"
                                                 headerNoWrap="true" formatType="text">
                                                 <af:outputText value="" />
                                            </af:column>
                                            <af:column sortable="true"
                                                 headerText="#{bundle.account_bucket_bucket_table_col4}"
                                                 headerNoWrap="true" formatType="text">
                                                 <af:outputText value="" />
                                            </af:column>
                                            <af:column sortable="true"
                                                 headerText="#{bundle.account_bucket_bucket_table_col5}"
                                                 headerNoWrap="true" formatType="icon">
                                                 <af:commandButton
                                                      text="#{bundle.account_bucket_bucket_adjustment_btn}"
                                                      action="" />
                                            </af:column>
                                       </af:table>
                                  </af:column>
                             </af:table>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                             <af:objectSeparator></af:objectSeparator>
                        </af:panelGroup>
                   </af:panelBorder>
              </af:document>
         </f:view>
    </jsp:root>
    When i use IE there is no problem, an iFrame is generated and the bucket detais are rendered into it.
    The problem is with Firefox, the is an iFrame in the HTML code, but there is no rendering of it : why ?
    it seems that iFrames are well-rendered with FireFox and i don't no how to change my page to render it good with both FireFox and IE
    Please tell me a solution, something to change with my ADF tags ?...
    Sincerely,
    edward.

    i found solution for the problem that i use the following code to include JavaScript file
    i found that the problem occurred when i use the following code to include JavaScript file
    <script type="text/javascript" src="javascriptfile.js"/>
    also if i included 2 JavaScript files only one file is included at runtime
    but when i used the following code to include JavaScript files
    <afh:script source="javascriptfile.js"/>
    the two problems were solved (the problem of LOV and the problem of including multiple /js files)
    i don't know if it is a bug in the ADF or i made a mistake in the previous way
    any way thanks to you all for helping me

  • I've had a problem with previewing rendered video files

    Hey guys, I'm Justin,
    thanks in advance.
    so when I render video files in fce, the video usually renders fine, but on the canvas the video just replays the first and last frame of the rendered video, making it look like a jumbled mess. but, when I export it as a quicktime file it runs just fine, I think the problem is in my canvas and I don't know how to fix it.
    Also I recently upgraded my system from 2gb of ram to 4gb of ram, can fce recognise this or do I need to do something fancy
    Thank you so much,
    Justin

    Hello, Justin, and welcome to the forum.
    Where is the video coming from and how are you getting it into FCE? Almost always, your best bet is to convert your media into a format with which FCE works natively before you bring it into the program. If you do that, rendering and lots of other issues are minimized.

  • Urgent :problem with JTable on server program

    hi all i am writing an internet cafe timer.there is a table with the following colums:PC Name,IP Address,Status,Time Left, Time Login. ,on the server GUI. Whenever a client connects,a new row having the clients details is added to the table model, which reflects on the table.but if a client disconnects and reconnects, i want it to search thru the rows in the model, if there is a row with its information already,it shouls simply update the status column to "Reconnected", and not add an entirly new row, but if there is no row with its information, it can then add a new row with its information.
    Simply put, when a client connects,it should check
    1)if the table is empty, add a new row;
    2)else, check if tabe already has a row for the client, then update the row,else add a new row.
    its not working this way.it only works for the first client to connect,if other clients connect and disconnect,it still adds a new row, instaed of updating.
    the method doTable() in class ClientThread is what i use .please check it out and help me.
    i have a thread for each client.when a client connects, the server starts the thread and passes an instance of the server ui to the thread, so the threads acess the tablemodel thru this instance.
    Here is a simple run down of my classes
    CafeServer.java
    * @(#)CafeServer.java
    * @author obinna
    * @version 1.00 2007/3/10
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.sql.*;
    public class CafeServer {
         int serverPort;
         int serverLimit;
         //ServerSocket serversocket;
         private static int rownum = -1;
         private static Connection conn;
         private static CafeServerUI serverUI;
    * Creates a new instance of <code>CafeServer</code>.
    public CafeServer() {
         try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              conn = DriverManager.getConnection("jdbc:odbc:cafetimer","","");
              System.out.println("connection established with cafetimer database");
         }catch(Exception ex){
              JOptionPane.showMessageDialog(null,"Cannot find database");
              serverUI = new CafeServerUI( this,conn );
    public void closeServer(){
         System.exit(0);
    public static void main(String[] args) throws IOException{
    // TODO code application logic here
    try{
         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         new CafeServer();
    catch(Exception ex){
         JOptionPane.showMessageDialog(null,"Could Not Find System Look and Feel.\nDefault L&F Loaded.");
         JFrame.setDefaultLookAndFeelDecorated(true);
    ServerSocket serverSocket = null;
    boolean listening = true;
    try {
    serverSocket = new ServerSocket(4444);
    } catch (IOException e) {
    System.err.println("Could not listen on port: 4444.");
    System.exit(-1);
    while (listening)
         new ClientThread(serverSocket.accept(),serverUI,conn).start();
    serverSocket.close();
    CafeServerUI.java
    //import statements.......................................
    public class CafeServerUI extends JFrame{
         public Vector pins = new Vector<String>();
         public DefaultTableModel model;
         public JTable table;
         protected JTextArea msgarea;
         protected JScrollPane scrpane;
         protected JPanel mainp,northp,leftp,rightupp,rightp;
         protected String[] colnames = {"Computer Name","IP Ad
    .............................................................constrctor follows
    ClientThread.java
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    public class ClientThread extends Thread{
         private Socket socket = null;
         private String pin, timeleft, pin3,timeleft3,tleft;
         private CafeServerUI csui = null;
         private Ticket ticket;
         private RemainingTime remtime;
         private String hostname,ipadd;
         private int rownum;
         private Connection conn;
         private Statement stmt;
         private ResultSet rs;
         private boolean found;
         public ObjectOutputStream outputStream;
         public ObjectInputStream inputStream;
         private Admin admin;
         boolean found2 = false;
         //private String[] newrow = new String[5];
    public ClientThread(Socket socket,CafeServerUI csui,Connection conn) {
              super("Client Thread");
              this.socket = socket;
              this.csui = csui;
              this.conn = conn;
              try{
                   stmt = this.conn.createStatement();
              }catch(Exception ex){
                   System.out.println(ex.getMessage() + " : " + ex);
              //this.rownum = rownum;
              hostname = this.socket.getInetAddress().getHostName();
              ipadd = this.socket.getInetAddress().getHostAddress();
              //sString[] newrow = {hostname,ipadd,"Connected","",""};
              doTable();
              //System.out.print("table row " + this.rownum);
              this.csui.oos.addElement(ClientThread.this);
    public void doTable(){
         String[] newrow = {hostname,ipadd,"Connected","",""};
         if(this.csui.model.getRowCount() == 0){
                   this.csui.model.addRow(newrow);
              }else{
                   for(int i=0; i < this.csui.model.getRowCount(); i++ ){
                        String hname = (String)this.csui.model.getValueAt(i,0);
                        if(hname.equalsIgnoreCase(hostname)){
                             this.csui.model.setValueAt("Re Connected",i,2);
                             break;
                        }else{
                             this.csui.model.addRow(newrow);
                             break;
    .....public void run()....

    In the UI is defined the InputMap/ActionMap pair to respond to keys. There is defined an action for ENTER. I have had the same problem, and the only thing that worked for me was to clear the actionMap, and reassign some keys to their original action, and some (e.g. ENTER, TAB) to my actions. This worked. With TAB is harder beacuse i guess it's deeper in the JVM implemented, but after a while i've managed to overwrite that too.

Maybe you are looking for

  • Why does my just rented movie say I can play it in 48 hours?

    So we came home on a Friday Night and commenced our family Pizza and Movie Night, sat down covered with cheese and for the first time decided to rent a movie on the Apple TV.  We had watched NetFlix movies for almost a year, with no issues.  But... n

  • ICalHelper re-sending ALL e-mail alarms in ALL calendars since PMU reset

    Dear iCal List, For various reasons, I reset the PMU on my PowerBook G4 today. (I had recently removed some preferences as well, in the hopes of curing an unrelated problem.) When I restarted the Mac and logged in, iCal proceeded to re-send EVERY e-m

  • Problems with WSDL file from Webservice definition

    Hi all, I trying to import into XI the WSDL file from a web service. I´m doing it following the blog /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi But I do not why but it is not creating the messages. Any Idea, Many thanks and

  • How to make a physical copy of database when using ASM

    I used to make a physical copy of production database every night to create test environment. I have simply physically copied files, recreated control file, ... to create it. But on 10g I want to use ASM, is there some way to do physical copy of the

  • Copy and open Command in Oracle 10g Linux (Minut, Ubuntu)

    Dear All; I am facing one problem we used to copy any document and for open any document in WINDOWS Host('CMD /C COPY '||'"'||:Old_Doc||'"'||' X:\03\03\'||:New_Doc); Client_Host('Cmd /C Start '||'X:\03\03\'||:New_Doc); But these commands not running