Add component to JTable

hi
can u please tell me how to add another component to Jtable cell...
for example JCheckBox to a cell...
cheers...

If you want to add components to a JTable just to layout them, in fact you
are better off using the GridBagLayout but, if you really need to display and
use a component in a JTable, you must learn how to build renderers and editors
for a table. Have a look at http://java.sun.com/docs/books/performance/ for
some introduction to the topic, and at
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
for some implemented examples.
Hope this helps
Andrea

Similar Messages

  • Add CheckBox to JTable

    How to add a checkBox in a column of my table?
    I would like to add a checkbox in column 3. Where should I add the Listener to?

    Here's a simple example using a JCheckBox as a renderer:
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.*;
    public class TableRenderer extends JFrame
        public TableRenderer()
            String[] columnNames = {"Date", "String", "Integer", "Decimal", "Boolean"};
            Object[][] data =
                {new Date(), "A", new Integer(1), new Double(5.1), new Boolean(true)},
                {new Date(), "B", new Integer(2), new Double(6.2), new Boolean(false)},
                {new Date(), "C", new Integer(3), new Double(7.3), new Boolean(true)},
                {new Date(), "D", new Integer(4), new Double(8.4), new Boolean(false)}
            DefaultTableModel model = new DefaultTableModel(data, columnNames);
            JTable table = new JTable( model )
                //  Returning the Class of each column will allow different
                //  renderers to be used based on Class
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            JScrollPane scrollPane = new JScrollPane( table );
            getContentPane().add( scrollPane );
            //  Create cell renderer
            TableCellRenderer centerRenderer = new CenterRenderer();
            //  Use renderer on a specific column
            TableColumn column = table.getColumnModel().getColumn(3);
            column.setCellRenderer( centerRenderer );
            //  Use renderer on a specific Class
            table.setDefaultRenderer(String.class, centerRenderer);
              scrollPane.getViewport().setBackground(Color.red);
        public static void main(String[] args)
            TableRenderer frame = new TableRenderer();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.pack();
            frame.setVisible(true);
        **  Center the text and highlight the focused cell
        class CenterRenderer extends DefaultTableCellRenderer
            public CenterRenderer()
                setHorizontalAlignment( CENTER );
            public Component getTableCellRendererComponent(
                JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
                super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
                if (hasFocus)
                    setBackground( Color.cyan );
                else if (isSelected)
                    setBackground( table.getSelectionBackground() );
                else
                    setBackground( table.getBackground() );
                return this;
    }For more information on "Using Tables" see the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • Add Jcombo in Jtable at run time

    hello,
    i want to add jcombo box in jtable every cell & i also add column in run time.proble is when i add new column that time last column combo is add but prievious column its remove automatic.
    so give me some code & where i can get see good example for add combo in jtable.
    thanks

    hi j-rg,
    It was really appreaciating to c ur reply, regarding the specific problem.Actually wht i was facing the peoblem, Am adding a colomn in the run time and in that column am adding a combo in each cells of that column.AS i was expecting am able to add a new colum in th erum time with the combo in each cells of that column,now when am adding another column in the run time am getting all the required things,but the problem is " in the previous cloumn am not getting that combo"(only the combo is been added in the last column).
    What am expecting is the combo should be there in each cell of the column(all columns)
    Am also sending the code wht am using, plz have a look below,
    df1.addColumn(result);
         TableColumn aa= tb1.getColumnModel().getColumn(tb1.getColumnCount()-1);
         aa.setCellEditor(new DefaultCellEditor(comboBox));
    wating for ur reply
    thanks and regards
    sandeep

  • Add component in task list

    Hello All,
    I have an issue with adding component in task list (for example task list number EIMN-68) via transaction IA05.
    When I try to add component to operation, I get the message *
    Standard BOM PAEIMN-68  4 already exists
    Message no. 29771
    Diagnosis
    You want to create a standard BOM for standard object PAEIMN-68 with usage .
    A BOM already exists for this standard object and usage. You cannot extend a standard a standard BOM.
    Procedure
    Check whether the standard BOM is suitable for standard object PAEIMN-68 and usage . If it is not, you need to create the BOM for another standard object.
    Is there any special way to create material master for such components.Whats the solution.
    Please help
    Cheers
    Sunny

    Hi Pithan, how are you..
    I want to add components.
    Just now I was able to add components. I explain how:
    When i added component number in operation, and press enter, system gave me the error that standard bom already exist. In the same screen I changed the BOM usage to 3 as universal usage. After this usage only, system allowed me to add components. No other bom usage allowed me to do so.
    Also, why system took me to BOM screen if I just want to add components.
    I wait for your reply.
    thanks and regards
    Sunny

  • How to add data into JTable

    How can I add data into JTable, for instance ("Mike", "Gooler", 21).

    How can I add data into JTable, for instance ("Mike",
    "Gooler", 21).You will have very good results if you segregate out the table model as a seperate user class and provide a method to add a row there. In fact, if you use the table to reflect a database table you can add the row inplace using the existing cursor. I believe it's TableExample2 in the jdk\demo\jfc\TableExamples that has a very good example of this.
    Walt

  • Facing problem to add component in a panel dynamically

    I face serious problem to add component dynamically on a jpanel. can any one help me?
    I have one panel inside a frame. And I have another 3 or 4 panel. dynamically i want to change the panel inside the frame with the other panel.
    can anybody help me with source code?
    Your earliest response is highly appreciated.

    remove is reflected immediately without calling
    validate() but it does not work for adding. please
    give me some code.Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html

  • Dynamic add component to panel, it does't work

    I want to add a label in a panel when you click button.
    I used revalidate() and revalidate() method, but it didn't appear in panel.
    HELP ME?? WHAT'S WRONG!
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    jPanel1.add(new JLabel("Hello"));
    jPanel1.revalidate();
    jPanel1.repaint();
    }

    i add Layout manager to panel. It works. Thanks,
    So tricky things for dynamic adding component:
    1, setup layout manager to container (such as panel),
    2, add component to container
    3, call revalidate() method to relayout these components in container
    You can't miss any one of those.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    jPanel1.setLayout(new FlowLayout());
    jPanel1.add(new JButton("Hello"));
    jPanel1.revalidate();
    }

  • Able to add component in approved Purchase Req from PM

    Hello,
    I have scenario where I create Purchase requisition from Plant Maintenance Work order and I have collective functionality turn on, means if I add component in the work order it will be added in the Purchase requisition created against that work order. now my requirement is if my purchase requisition is approved system should not allow me to add the component to same purchase requisition from PM work order.
    any help would be highly appreciated.
    Regards
    Shailendra

    Dear shailendra soni,
    Have you tried Changeability of Purchasing Document During/After Release.
    Path is :SPRO->MM->Purchasing->PR-Rel.Str.Procedure W/Classification->Setup Procedure with Classification-Release indicator
    Here as per your release code - select required option which suits you - (1- cannot be changed)
    Refer Image
    reg,
    Bhg

  • Unable to add component palette in jdeveloper

    Hi,
    Im unable to add component palette in jdeveloper, it is giving exception and the stack trace is here below, pls let me know the solution.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    java.lang.NullPointerException
         at oracle.ideimpl.palette.PaletteImpl.populate(PaletteImpl.java:240)
         at oracle.ideimpl.palette.PaletteWindowImpl.checkIfPopulated(PaletteWindowImpl.java:323)
         at oracle.ideimpl.palette.PaletteWindowImpl.show(PaletteWindowImpl.java:364)
         at oracle.ideimpl.palette.PaletteManagerImpl.handleEvent(PaletteManagerImpl.java:174)
         at oracle.ide.IdeAction$1.run(IdeAction.java:579)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

    Try copying the palette.xml file from jdev\multi\system to your system directory( jdev\system(9....). Also, what system are you using?

  • Add JTree in JTable

    How to add JTree in JTable?
    Please tell me?

    you need to use a TableCellRenderer, that implements your JTree, for cell renderers see http://java.sun.com/docs/books/tutorial/uiswing/components/table.html and http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#renderer
    thomas

  • Cannot add component with id '_id0' and path

    Hello together!
    Thanks for your help so far you really helped me a lot.
    Now most of the time my application is working fine, but I get sometimes the error:
    javax.servlet.ServletException: cannot add component with id '_id0' and path : {Component-Path : [Class: javax.faces.component.html.HtmlOutputText,Id: _id0]} to its parent component. This might be a problem due to duplicate ids.
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
         org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    What can I do to prevent that?
    Thanks a lot.

    I don't know if the html could would help, but I post it anyways as I am really going crazy:
    This is the code at the begining:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <link rel="stylesheet" href="style.css" type="text/css">
    <title>Guardar Rayos X</title>
    <script src="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/JSCookMenu.js" type="text/javascript"><!--
    //--></script>
    <script src="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/MyFacesHack.js" type="text/javascript"><!--
    //--></script>
    <script type="text/javascript"><!--
    myThemeOfficeBase='/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/';
    //--></script>
    <script src="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/theme.js" type="text/javascript"><!--
    //--></script>
    <link rel="stylesheet" href="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/theme.css" type="text/css" /></head>
    <body>
       <link rel="stylesheet" href="style.css" type="text/css">
            <table>
              <tr>
                   <td>
                           <h1>
                                Rayos X
                           </h1>
                      </td>
                 </tr>
            </table>
    <script language="JavaScript" src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
    <script language="JavaScript" src="jscookmenu/ThemeOffice/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemeOffice/theme.css" type="text/css">
    <script language="JavaScript" src="jscookmenu/ThemeMiniBlack/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemeMiniBlack/theme.css" type="text/css">
    <script language="JavaScript" src="jscookmenu/ThemeIE/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemeIE/theme.css" type="text/css">
    <script language="JavaScript" src="jscookmenu/ThemePanel/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemePanel/theme.css" type="text/css">
         <table>
              <tr>
                   <td>
                        <table id="header_group2" border="0"><tbody><tr><td><script type="text/javascript"><!--
    var id3_menu =
    [[null, 'Salir', 'id3_menu:#{user.logout}', 'linkDummyForm', null],
    [null, 'Persona', null, 'linkDummyForm', null,[null, 'Buscar persona', 'id3_menu:searchPerson', 'linkDummyForm', null],
    [null, 'Modificar persona', 'id3_menu:modifyPerson', 'linkDummyForm', null]],
    [null, 'Consulta', null, 'linkDummyForm', null,[null, 'Buscar por consulta', 'id3_menu:searchVisit', 'linkDummyForm', null],
    [null, 'Modificar consulta', 'id3_menu:modifyVisit', 'linkDummyForm', null]],
    [null, 'Exportar', null, 'linkDummyForm', null,[null, 'Paciente', 'id3_menu:patientExport', 'linkDummyForm', null]],
    [null, 'Preferencias', null, 'linkDummyForm', null,[null, 'Idioma', null, 'linkDummyForm', null,[null, 'Espa�ol', 'id3_menu:#{message.setLanguageToSpanish}', 'linkDummyForm', null],
    [null, 'Ingles', 'id3_menu:#{message.setLanguageToEnglish}', 'linkDummyForm', null]]]];
    //--></script><div id="id3_menu"></div>
    <script type="text/javascript"><!--
         cmDraw ('id3_menu', id3_menu, 'hbr', cmThemeOffice, 'ThemeOffice');
    //--></script></td></tr>
    </tbody></table>
                   </td>
                 </tr>
            </table>
         <form id="visitForm" name="visitForm" method="post" action="/Webprojekt/modifyVisit.faces" enctype="multipart/form-data">
             <table>
                   <tr>
                        <td>
                             <label for="visitForm:patient">
                                  <span id="visitForm:lPatient">Paciente: </span>
                             </label>
                        </td>
                        <td><input id="visitForm:patient" name="visitForm:patient" type="text" value="" />
                             <input id="visitForm:btnPatient" name="visitForm:btnPatient" type="submit" value="..." onclick="clear_visitForm();" />
                        </td>               
                   </tr>
                   <tr>
                        <td>
                             <label for="visitForm:doctor">
                                  <span id="visitForm:lDoctor">Doctor: </span>
                             </label>
                        </td>
                        <td><input id="visitForm:doctor" name="visitForm:doctor" type="text" value="" />
                             <input id="visitForm:btnDoctor" name="visitForm:btnDoctor" type="submit" value="..." onclick="clear_visitForm();" />
                        </td>               
                   </tr>
                   <tr>
                        <td>
                             <label for="visitForm:type">
                                  <span id="visitForm:lType">Estudio: </span>
                             </label>
                        </td>
                        <td>
                             <select id="visitForm:selectOneType" name="visitForm:selectOneType" size="1">     <option value="X-Ray Full">X-Ray Full</option>     <option value="X-Ray Arm">X-Ray Arm</option>     <option value="X-Ray Leg">X-Ray Leg</option>     <option value="X-Ray Foot">X-Ray Foot</option></select>
                        </td>                         
                   </tr>
                   <tr>
                        <td>
                             <label for="visitForm:location">
                                  <span id="visitForm:lLocation">Lugar: </span>
                             </label>
                        </td>
                        <td>
                             <select id="visitForm:selectOneLocation" name="visitForm:selectOneLocation" size="1">     <option value="Mexico City">Mexico City</option>     <option value="Hermosillo">Hermosillo</option></select>
                        </td>                         
                   </tr>
                   <tr>
                        <td>
                             <input type="checkbox" name="visitForm:nextVisit" id="visitForm:nextVisit" value="true" />
                        </td>
                        <td>
                             <label for="visitForm:nextVisit">
                                  <span id="visitForm:lNextVisit">Requiere otra consulta.</span>
                             </label>
                        </td>
                   </tr>
                   <tr>
                        <td>
                             <hr width=100%>
                        </td>
                        <td>
                             <hr width=100%>
                        </td>
                   </tr>
                   <tr>
                       <td>
                             <label for="visitForm:fileUpload">
                                  <span id="visitForm:lFileUploas">Rayos X: </span>
                             </label>
                        </td>
                       <td>
                            <input type="file" id="visitForm:upload" name="visitForm:upload" />
                            <!--
                             <input type="file" id="visitForm:_id25" name="visitForm:_id25" />-->     
                       </td>
                  </tr>
                  <tr>
                       <td>
                             <label for="visitForm:diagnostic">
                                  <span id="visitForm:lDiagnistic">Diagnostico: </span>
                             </label>
                        </td>
                       <td><textarea name="visitForm:diagnostic" id="visitForm:diagnostic"></textarea></td>
                  </tr>
                  <tr>
                       <td>
                            <input id="visitForm:btnAdd" name="visitForm:btnAdd" type="submit" value="A�adir" onclick="clear_visitForm();" />
                            <input id="visitForm:btnSearch" name="visitForm:btnSearch" type="submit" value="Buscar" onclick="clear_visitForm();" />
                       </td>
                  </tr>
                  <tr>
                   </tr>
             </table>
        <input type="hidden" name="visitForm_SUBMIT" value="1" /><input type="hidden" name="visitForm:_link_hidden_" /><script type="text/javascript"><!--
    function clear_visitForm() {
      var f = document.forms['visitForm'];
      f.elements['visitForm:_link_hidden_'].value='';
      f.target='';
    clear_visitForm();
    //--></script></form>
        <p>
        <div>
    <table id="diagnostics" class="list-background">
    <thead>
    <tr><th>Imagen</th><th>Diagnostico</th><th></th><th></th><th></th></tr></thead>
    <tbody id="diagnostics:tbody_element"></tbody></table>
              </div>
              <form id="_id42" name="_id42" method="post" action="/Webprojekt/modifyVisit.faces" enctype="application/x-www-form-urlencoded">
                   <table>
                        <tr>
                             <td>
                                  <input id="_id42:btnAddVisit" name="_id42:btnAddVisit" type="submit" value="A�adir" onclick="clear__5Fid42();" />
                             </td>
                             <td>
                                  <input id="_id42:btnUpdateVisit" name="_id42:btnUpdateVisit" type="submit" value="Grabar" onclick="clear__5Fid42();" />
                             </td>
                             <td>
                                  <input id="_id42:btnAllToWord" name="_id42:btnAllToWord" type="submit" value="Pasar todo a Word." onclick="clear__5Fid42();" />
                             </td>
                        </tr>
                   </table>
              <input type="hidden" name="_id42_SUBMIT" value="1" /><input type="hidden" name="_id42:_link_hidden_" /><script type="text/javascript"><!--
    function clear__5Fid42() {
      var f = document.forms['_id42'];
      f.elements['_id42:_link_hidden_'].value='';
      f.target='';
    clear__5Fid42();
    //--></script></form>
         <p>
    <link rel="stylesheet" href="style.css" type="text/css">
    <table>
         <tr>
              <td>
                X-Ray, Copyright (c) 2006  Markus Sz�ky
            </td>
            </tr>
    </table>
    </body>
    <form id="linkDummyForm" name="linkDummyForm" style="display:inline" method="post" action="/Webprojekt/modifyVisit.faces"><input type="hidden" name="jscook_action" /><script type="text/javascript"><!--
    function clear_linkDummyForm() {
      var f = document.forms['linkDummyForm'];
      f.elements['jscook_action'].value='';
      f.target='';
    clear_linkDummyForm();
    //--></script></form>
    </html>and this is the code after I press a button, without any functionality, but the footer is already wrong.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <link rel="stylesheet" href="style.css" type="text/css">
    <title>Guardar Rayos X</title>
    <script src="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/JSCookMenu.js" type="text/javascript"><!--
    //--></script>
    <script src="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/MyFacesHack.js" type="text/javascript"><!--
    //--></script>
    <script type="text/javascript"><!--
    myThemeOfficeBase='/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/';
    //--></script>
    <script src="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/theme.js" type="text/javascript"><!--
    //--></script>
    <link rel="stylesheet" href="/Webprojekt/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/theme.css" type="text/css" /></head>
    <body>
       <link rel="stylesheet" href="style.css" type="text/css">
            <table>
              <tr>
                   <td>
                           <h1>
                                Rayos X
                           </h1>
                      </td>
                 </tr>
            </table>
    <script language="JavaScript" src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
    <script language="JavaScript" src="jscookmenu/ThemeOffice/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemeOffice/theme.css" type="text/css">
    <script language="JavaScript" src="jscookmenu/ThemeMiniBlack/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemeMiniBlack/theme.css" type="text/css">
    <script language="JavaScript" src="jscookmenu/ThemeIE/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemeIE/theme.css" type="text/css">
    <script language="JavaScript" src="jscookmenu/ThemePanel/theme.js"></script>
    <link rel="stylesheet" href="jscookmenu/ThemePanel/theme.css" type="text/css">
         <table>
              <tr>
                   <td>
                        <table id="header_group2" border="0"><tbody><tr><td><script type="text/javascript"><!--
    var id3_menu =
    [[null, 'Salir', 'id3_menu:#{user.logout}', 'linkDummyForm', null],
    [null, 'Persona', null, 'linkDummyForm', null,[null, 'Buscar persona', 'id3_menu:searchPerson', 'linkDummyForm', null],
    [null, 'Modificar persona', 'id3_menu:modifyPerson', 'linkDummyForm', null]],
    [null, 'Consulta', null, 'linkDummyForm', null,[null, 'Buscar por consulta', 'id3_menu:searchVisit', 'linkDummyForm', null],
    [null, 'Modificar consulta', 'id3_menu:modifyVisit', 'linkDummyForm', null]],
    [null, 'Exportar', null, 'linkDummyForm', null,[null, 'Paciente', 'id3_menu:patientExport', 'linkDummyForm', null]],
    [null, 'Preferencias', null, 'linkDummyForm', null,[null, 'Idioma', null, 'linkDummyForm', null,[null, 'Espa�ol', 'id3_menu:#{message.setLanguageToSpanish}', 'linkDummyForm', null],
    [null, 'Ingles', 'id3_menu:#{message.setLanguageToEnglish}', 'linkDummyForm', null]]]];
    //--></script><div id="id3_menu"></div>
    <script type="text/javascript"><!--
         cmDraw ('id3_menu', id3_menu, 'hbr', cmThemeOffice, 'ThemeOffice');
    //--></script></td></tr>
    </tbody></table>
                   </td>
                 </tr>
            </table>
         <form id="visitForm" name="visitForm" method="post" action="/Webprojekt/modifyVisit.faces" enctype="multipart/form-data">
             <table>
                   <tr>
                        <td>
                             <label for="visitForm:patient">
                                  <span id="visitForm:lPatient">Paciente: </span>
                             </label>
                        </td>
                        <td><input id="visitForm:patient" name="visitForm:patient" type="text" value="" />
                             <input id="visitForm:btnPatient" name="visitForm:btnPatient" type="submit" value="..." onclick="clear_visitForm();" />
                        </td>               
                   </tr>
                   <tr>
                        <td>
                             <label for="visitForm:doctor">
                                  <span id="visitForm:lDoctor">Doctor: </span>
                             </label>
                        </td>
                        <td><input id="visitForm:doctor" name="visitForm:doctor" type="text" value="" />
                             <input id="visitForm:btnDoctor" name="visitForm:btnDoctor" type="submit" value="..." onclick="clear_visitForm();" />
                        </td>               
                   </tr>
                   <tr>
                        <td>
                             <label for="visitForm:type">
                                  <span id="visitForm:lType">Estudio: </span>
                             </label>
                        </td>
                        <td>
                             <select id="visitForm:selectOneType" name="visitForm:selectOneType" size="1">     <option value="X-Ray Full" selected="selected">X-Ray Full</option>     <option value="X-Ray Arm">X-Ray Arm</option>     <option value="X-Ray Leg">X-Ray Leg</option>     <option value="X-Ray Foot">X-Ray Foot</option></select>
                        </td>                         
                   </tr>
                   <tr>
                        <td>
                             <label for="visitForm:location">
                                  <span id="visitForm:lLocation">Lugar: </span>
                             </label>
                        </td>
                        <td>
                             <select id="visitForm:selectOneLocation" name="visitForm:selectOneLocation" size="1">     <option value="Mexico City" selected="selected">Mexico City</option>     <option value="Hermosillo">Hermosillo</option></select>
                        </td>                         
                   </tr>
                   <tr>
                        <td>
                             <input type="checkbox" name="visitForm:nextVisit" id="visitForm:nextVisit" value="true" />
                        </td>
                        <td>
                             <label for="visitForm:nextVisit">
                                  <span id="visitForm:lNextVisit">Requiere otra consulta.</span>
                             </label>
                        </td>
                   </tr>
                   <tr>
                        <td>
                             <hr width=100%>
                        </td>
                        <td>
                             <hr width=100%>
                        </td>
                   </tr>
                   <tr>
                       <td>
                             <label for="visitForm:fileUpload">
                                  <span id="visitForm:lFileUploas">Rayos X: </span>
                             </label>
                        </td>
                       <td>
                            <input type="file" id="visitForm:upload" name="visitForm:upload" />
                            <!--
                             <input type="file" id="visitForm:_id25" name="visitForm:_id25" />-->     
                       </td>
                  </tr>
                  <tr>
                       <td>
                             <label for="visitForm:diagnostic">
                                  <span id="visitForm:lDiagnistic">Diagnostico: </span>
                             </label>
                        </td>
                       <td><textarea name="visitForm:diagnostic" id="visitForm:diagnostic"></textarea></td>
                  </tr>
                  <tr>
                       <td>
                            <input id="visitForm:btnAdd" name="visitForm:btnAdd" type="submit" value="A�adir" onclick="clear_visitForm();" />
                            <input id="visitForm:btnSearch" name="visitForm:btnSearch" type="submit" value="Buscar" onclick="clear_visitForm();" />
                       </td>
                  </tr>
                  <tr>
                   </tr>
             </table>
        <input type="hidden" name="visitForm_SUBMIT" value="1" /><input type="hidden" name="visitForm:_link_hidden_" /><script type="text/javascript"><!--
    function clear_visitForm() {
      var f = document.forms['visitForm'];
      f.elements['visitForm:_link_hidden_'].value='';
      f.target='';
    clear_visitForm();
    //--></script></form>
        <p>
        <div>
    <table id="diagnostics" class="list-background">
    <thead>
    <tr><th>Imagen</th><th>Diagnostico</th><th></th><th></th><th></th></tr></thead>
    <tbody id="diagnostics:tbody_element"></tbody></table>
              </div>
                   <table>
                        <tr>
                             <td>
                                  <input id="btnAddVisit" name="btnAddVisit" type="submit" value="A�adir" onclick="clear_linkDummyForm();" />
                             </td>
                             <td>
                                  <input id="btnUpdateVisit" name="btnUpdateVisit" type="submit" value="Grabar" onclick="clear_linkDummyForm();" />
                             </td>
                             <td>
                                  <input id="btnAllToWord" name="btnAllToWord" type="submit" value="Pasar todo a Word." onclick="clear_linkDummyForm();" />
                             </td>
                        </tr>
                   </table>
         <p>
    <link rel="stylesheet" href="style.css" type="text/css">
    <table>
         <tr>
              <td>
                Guardar Rayos X
            </td>
            </tr>
    </table>
    </body>
    <form id="linkDummyForm" name="linkDummyForm" style="display:inline" method="post" action="/Webprojekt/modifyVisit.faces"><input type="hidden" name="linkDummyForm:_link_hidden_" /><input type="hidden" name="jscook_action" /><script type="text/javascript"><!--
    function clear_linkDummyForm() {
      var f = document.forms['linkDummyForm'];
      f.elements['linkDummyForm:_link_hidden_'].value='';
      f.elements['jscook_action'].value='';
      f.target='';
    clear_linkDummyForm();
    //--></script></form>
    </html>

  • HOW TO ADD COLORS TO JTABLE ROWS??

    I want to change the colors of alternate rows in my JTable. I am doing so using CellRenderer, but then I am not able to view the selected rows.
    tell me how can I change the row color as well as a selected row should be identifiable from others, as ordinary JTable.
    thanks

    Hi,
    try this:
    define your own DefaultTableCellRenderer like this:
    class MyRenderer 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);
    if (isSelected) setBackground( Color.anyColor );               
    return this;
    Hope it helps!
    Regards, Paul

  • I receive "Database access denied" when trying to add component 4543BD

    I receive "Database access denied" when trying to add component 4543BD to my schematic. This component was added from a previous version. I'm using Multisim version 12.0.0  Student edition.
    Solved!
    Go to Solution.

    Hi Diarra,
    I checked my database and  the  4543 is not in the Student Edition. If you opened a schematic that was created in a higher version such as the Educaiton Edition and copied the part to your database, when you place this part you will get the access denied message. 
    Attached is a schematic with the part, you can open it and build you circuit around it.
    Tien P.
    National Instruments
    Attachments:
    4543.ms12 ‏62 KB

  • Runtime add component inconsistency

    Hi All,
    When I add component (hyperlink) at run time on integrated server I see different dialog than when I do it on stand alone WLS. On WLS I have no short desk and show component has no option to enter expression but just check box which is critical. Does anybody know what update should be done to add the capability to WLS that I can enjoy on integrated server (Documentation, links)?
    JDeveloper 11.1.1.5.0, WLS 10.3.5
    Thanks,
    SNikiforov

    ALWAYS execute the following if you add or remove components from an already visible container:
    container.revalidate();
    container.repaint();

  • Example for add(component,object)

    Hi,
    I have a program and am trying to understand that. it is constructing a jpanel. I need to know what this means.
    panel.add(panelA,"4,4,4,10");
    what is 4,4,4,10
    could any one give me a small example of how to use add(component,objet)
    Appreciate all your help
    Thanks

    Not sure what that is about. Its not normal syntax.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layout Managers for better examples and explanations of adding Components to Containers.

Maybe you are looking for