Can't get Checkbox selection status in Tree

Hi,
I'm using a Checkbox Tree which I got from here: [http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm|http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm]
Now, I want to determine whether the Checkboxes are selected or not.
Unfortunately, the custom CheckBox model class always returns true, which is stored in a Vector.
In short, this is how the checkTree is created:
CheckBoxNode tabFormatNode = new CheckBoxNode[]{new CheckBoxNode("GP3", true),
                                    new CheckBoxNode("GP4", true),
                                    new CheckBoxNode("GP5", true)};
NamedVector formatVector = new NamedVector("Format", tabFormatNode);
Object[] rootNodes = new Object[]{ formatVector }
Vector rootVector = new NamedVector("root", rootNodes);
TreeModel model = createTreeModel(rootVector);
setModel(model);As I said, when I retrieve a CheckBoxNode from the Vector, it always return true on isSelected(), so that's no use.
However, the renderer does manage to get the selection status correctly.
private static class CheckBoxNodeRenderer implements TreeCellRenderer
        private JCheckBox leafRenderer = new JCheckBox();
        protected JCheckBox getLeafRenderer()
            return leafRenderer;
        public CheckBoxNodeRenderer()
        public Component getTreeCellRendererComponent(JTree tree, Object value,
              boolean selected, boolean expanded, boolean leaf, int row,
              boolean hasFocus)
            Component returnValue;
            if (leaf)
                String stringValue = tree.convertValueToText(value, selected,
                    expanded, leaf, row, false);
                leafRenderer.setText(stringValue);
                leafRenderer.setSelected(false);
                if (selected)
                    leafRenderer.setForeground(selectionForeground);
                    leafRenderer.setBackground(selectionBackground);
                else
                    leafRenderer.setForeground(textForeground);
                    leafRenderer.setBackground(textBackground);
                if ((value != null) && (value instanceof DefaultMutableTreeNode))
                    Object userObject = ((DefaultMutableTreeNode) value)
                    .getUserObject();
                    if (userObject instanceof CheckBoxNode)
                        CheckBoxNode node = (CheckBoxNode) userObject;
                        leafRenderer.setText(node.getText());
                        leafRenderer.setSelected(node.isSelected());
                        // eigen
                        leafRenderer.setEnabled(Overview.getTabbedPane().getActiveTabList().isLeftPaneEnabled());
                returnValue = leafRenderer;
            else
              returnValue = nonLeafRenderer.getTreeCellRendererComponent(tree,
                  value, selected, expanded, leaf, row, hasFocus);
            return returnValue;
    }Could anyone help me with retrieving the correct selection values of the CheckBoxes?
Edited by: Tails on 21-mrt-2008 13:07

OK Tails. here are the changes you need, in CheckBoxNodeEditor method getTreeCellEditorComponent. Note that Component editor is now declared as final so that in can be accessed from within the inner class.   public Component getTreeCellEditorComponent (JTree tree, Object value,
         boolean selected, boolean expanded, boolean leaf, int row) {
      // change to final
      final Component editor = renderer.getTreeCellRendererComponent (tree, value,
            true, expanded, leaf, row, true);
      // editor always selected / focused
      // line added
      final CheckBoxNode cbn = (CheckBoxNode) ((DefaultMutableTreeNode) value).getUserObject ();
      ItemListener itemListener = new ItemListener () {
         public void itemStateChanged (ItemEvent itemEvent) {
            // line added
            cbn.setSelected (((CheckBoxNode) getCellEditorValue ()).isSelected ());
            if (stopCellEditing ()) {
               fireEditingStopped ();
      if (editor instanceof JCheckBox) {
         ((JCheckBox) editor).addItemListener (itemListener);
      return editor;
   }Get back to us on whether that solves the problem, willya.
db

Similar Messages

  • How can we get the selected line number from JTextArea ?

    how can we get the selected line number from JTextArea ? and want to insert line/string given line number into JTextArea??? is it possible ?

    Praitheesh wrote:
    how can we get the selected line number from JTextArea ?
    textArea.getLineOfOffset(textArea.getCaretPosition());
    and want to insert line/string given line number into JTextArea??? is it possible ?
    int lineToInsertAt = 5; // Whatever you want.
    int offs = textArea.getLineStartOffset(lineToInsertAt);
    textArea.insert("Text to insert", offs);

  • How to dynamic construct checkbox  and get the selected status

    Hello. I'm new to the JSF development. I need to dynamically generate the table data based on the selection of database table name . The first column is the checkbox which will allow user to select one or more rows for modification, deletion, etc. Here is the partial code that i wrote to add checkbox to the first column of the table in the backing bean. I would like to generate the same checkbox binding as we did from Design Palette.
    <webuijsf:checkbox binding="#{UpdateTable.checkbox}" id="checkbox" selected="#{UpdateTable.selectedRow}"/>
    Checkbox checkbox = new Checkbox();
    checkbox.setValueBinding("name", getApplication().createValueBinding("#{currentRow.value['ROWID_VALUE']}"));
    checkbox.setValueBinding("selected", getApplication().createValueBinding("#{UpdateTable.selectedRow}"));
    tableColumn1.getChildren().add(checkbox);
    Once user checked the box, the backing bean should be able to catch the event.
    * Records whether or not the current row should be marked as selected,
    * based on the state of the checkbox.
    public void setSelectedRow(boolean b) {
    System.out.print("click");
    TableRowDataProvider rowdp = (TableRowDataProvider) getBean("currentRow");
    RowKey rowKey = rowdp.getTableRow();
    if (checkbox.isChecked()) {
    selectedRows.add(rowKey);
    } else {
    selectedRows.remove(rowKey);
    But it's not working as I thought. I'm not sure if I can binding selected with backing bean attribute like I did above. Please help!!!
    Edited by: askMore on Aug 6, 2009 12:25 PM

    dt cust min max
    1   a 100 200
    1   b 300 400
    1   c 500 600
    2   a 200 300
    2   b 400 500
    2   c 600 700
    CREATE OR REPLACE FUNCTION scott.rowtocol(p_slct IN VARCHAR2,p_dlmtr IN VARCHAR2 DEFAULT
    RETURN VARCHAR2 AUTHID CURRENT_USER
    AS
      TYPE c_refcur IS REF CURSOR;
      lc_str VARCHAR2 (4000);
      lc_colval VARCHAR2 (4000);
      lc_colval2 VARCHAR2 (4000);
      c_dummy c_refcur;
    BEGIN
      OPEN c_dummy FOR p_slct;
      LOOP
        FETCH c_dummy
        INTO lc_colval,lc_colval2;
        EXIT WHEN c_dummy%NOTFOUND;
        lc_str := lc_str || p_dlmtr || lc_colval || '=' || lc_colval2;
      END LOOP;
      CLOSE c_dummy;
      RETURN SUBSTR (lc_str, 2);
    END;
    SQL> SELECT DISTINCT a.dt,
                    rowtocol
                    ( 'SELECT cust , min  FROM tst WHERE dt = '
                      || ''''
                      || a.dt
                      || ''''
                    ) AS min ,
                   rowtocol
                    ( 'SELECT cust , max  FROM tst WHERE dt = '
                      || ''''
                      || a.dt
                      || ''''
                    ) AS max
    FROM tst a;
      2    3    4    5    6    7    8    9   10   11   12   13   14 
         DT MIN                         MAX
          1 a=100,b=300,c=500               a=200,b=400,c=600
          2 a=200,b=400,c=600               a=300,b=500,c=700

  • How can I get the selected rows from two ALV grids at the same time?

    I have a program that uses two ALV grids in one dialog screen. I'm using the OO ALV model (SALV* classes).
    The user can select any number of rows from each grid. Then, when a toolbar pushbutton is pressed, I'd have to retrieve the selected rows from both grids and start some processing with these rows.
    It is no problem to assign event handlers to both grids, and use the CL_SALV_TABLE->GET_SELECTIONS and CL_SALV_SELECTIONS->GET_SELECTED_ROWS methods to find out which rows were marked by the user. Trouble is, this only works when I raise an event in each grid separately, for instance via an own function that I added to the grid's toolbar. So, I can only see the selected rows of the same grid where such an event was raised.
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.
    As it is right now, I can have an own button in both grid's toolbar, select the rows, click on the extra button in each grid (this will tell me what entries were selected per grid). Then, I'd have to click on a third button (the one in the dialog screen's toolbar), and process the selected rows from both grids.
    How can I select the rows, then click on just one button, and process the marked entries from both grids?
    Is it somehow possible to raise an event belonging to each grid programmatically, so that then the corresponding CL_SALV_SELECTIONS->GET_SELECTED_ROWS will work?
    Thanks.

    Hello Tamas ,
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.--->
    is it possible to  have a check box in each grid  & get the selected lines in PAI of the screen ?
    regards
    prabhu

  • How can i get the selected PageItem in InDesign

    Hi
    i received the hint to post the message into this forum. so i try it...
    After implementing a floating panel and receiveing the "afterSelectionChanged"-Event i would like to get the selected PageItem, if one is selected...
    In the datastructure i can only find the activeLayer (event.target.activeLayer)  and the activePage (event.target.activeLayer), but no activePageItem or so.
    Is there a possibility to get this PageItem?
    best thanks for any hint.
    Lorenzo

    Lorenzo,
    This is the SDK forum. David sent you to the scripting forum: http://forums.adobe.com/community/indesign/indesign_scripting
    But I already answered on the CS SDK forum http://forums.adobe.com/message/3915745#3915745
    Harbs

  • Can't get Single selection to work in jtable using Netbeans

    I used the GUI editor to create a jTable to play around and I can't get the single selection to work as it should
    I have it set like this:
    jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);The table still selection the rows as if they were set as Multi Interval selection. Anyone could explain why?
    Here is the full source
    To change this template, choose Tools | Templates
    *and open the template in the editor.*
    Tableframe.java
    Created on Jun 7, 2009, 6:57:57 PM
    *package examples;*
    @author ME
    *public class Tableframe extends javax.swing.JFrame {*
    *    /** Creates new form Tableframe */*
    *    public Tableframe() {*
    *        initComponents();*
    *    /** 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.*
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jScrollPane1 = new javax.swing.JScrollPane();
            jTable1 = new javax.swing.JTable();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jTable1.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {
                    {null, null, null, null},
                    {null, null, null, null},
                    {null, null, null, null},
                    {null, null, null, null}
                new String [] {
                    "Title 1", "Title 2", "Title 3", "Title 4"
            jTable1.setOpaque(false);
            jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
            jTable1.setShowHorizontalLines(false);
            jTable1.setShowVerticalLines(false);
            jTable1.getTableHeader().setReorderingAllowed(false);
            jScrollPane1.setViewportView(jTable1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(13, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(25, Short.MAX_VALUE))
            pack();
        }// </editor-fold>
    *@param args the command line arguments*
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Tableframe().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTable jTable1;
        // End of variables declaration
    }

    I used the GUI editor to create a jTable to play around and I can't get the single selection to work as it should
    I have it set like this:
    jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);The table still selection the rows as if they were set as Multi Interval selection. Anyone could explain why?
    Here is the full source
    To change this template, choose Tools | Templates
    *and open the template in the editor.*
    Tableframe.java
    Created on Jun 7, 2009, 6:57:57 PM
    *package examples;*
    @author ME
    *public class Tableframe extends javax.swing.JFrame {*
    *    /** Creates new form Tableframe */*
    *    public Tableframe() {*
    *        initComponents();*
    *    /** 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.*
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jScrollPane1 = new javax.swing.JScrollPane();
            jTable1 = new javax.swing.JTable();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jTable1.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {
                    {null, null, null, null},
                    {null, null, null, null},
                    {null, null, null, null},
                    {null, null, null, null}
                new String [] {
                    "Title 1", "Title 2", "Title 3", "Title 4"
            jTable1.setOpaque(false);
            jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
            jTable1.setShowHorizontalLines(false);
            jTable1.setShowVerticalLines(false);
            jTable1.getTableHeader().setReorderingAllowed(false);
            jScrollPane1.setViewportView(jTable1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(13, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(25, Short.MAX_VALUE))
            pack();
        }// </editor-fold>
    *@param args the command line arguments*
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Tableframe().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTable jTable1;
        // End of variables declaration
    }

  • Can I get the GP status using GP API.

    Hi all,
    Can I use the GP API to get one process status present,for example,"reject" or "approve" according to the process instance ID?
    If there's a way,how can i archive this?
    Best regards,
    delma

    Hi,
    Using GP API it is possible to achieve the process status of any particular process.
    In the package com.sap.caf.eu.gp.process.api, we have several classes that can give the process such as IGP Process and the status can be achieved by the method getStatus.
    For more information refer to this link:
    http://help.sap.com/javadocs/nwce/current/gp/index.html
    Award points if helpful.
    Regards,
    Sujana

  • Can not get text selection cursor to change to column selection cursor

    Hi, Thank You for any time and help .
    I'm new to InDesign, and I'm hoping to use the new feature of moving columns / rows.
    But, I can not get the text cursor to change into the column or row selection cursor. 
    I am able to get the resize cursor, or use the ctrl+3 shortcut to select the entire column,
    but I can not get the downward pointing arrow cursor to select the column, and/or move it.
    Sometimes the row selection cursor will appear, and some rows can be moved, but I have been unable to move the columns.
    Thanks again, all my best

    Thank You Sumit !
    That does appear to work, but not in all cases?
    Example: 9/12/2014 10:44:14 AM - YouTube  <--quick vid capture of issue.
    I am able to select and move columns and rows, but columns appear to need a 'clean' column to work / move?
    Thanks again, I sincerely appreciate it!

  • I can not get link-value  from af:tree.

    Hello.
    I use jdeveloper 10g.
    I can not get link-value from tree.
    I use following code:
    <f:facet name="nodeStamp">
    <h:panelGroup binding="#{backing_dialogDic_dic_ETS.panelGroup1}"
    id="panelGroup1">
    <h:outputText value="#{item.vidNum} #{item.vidName}"
    binding="#{backing_dialogDic_dic_ETS.outputText1}"
    id="outputText1"/>
    <af:commandLink
    binding="#{backing_dialogDic_dic_ETS.commandLink2}"
    id="commandLink2"
    action="#{backing_dialogDic_dic_ETS.returnObject}">
    <af:setActionListener from="#{item.idVid}"
    to="#{processScope.ETSId}"/>
    <af:objectImage source="/images/icons/10.gif"
    shortDesc="Выбрать"
    binding="#{backing_dialogDic_dic_ETS.objectImage2}"
    id="objectImage2"/>
    </af:commandLink>
    </h:panelGroup>
    </f:facet>
    </af:tree>
    //in java bean:
    public String return_Object() {
    Object ob = JSFUtils.getManagedBeanValue("processScope.ETSId");
    System.out.println(o);
    return null;
    In console I see null.
    How I get this value???
    I can get this value if i use treeTable instead of tree.
    Thx, Dema.

    Hi,
    not that I think it matters, but the processScope is not a managed bean but a memory scope. So if
    JSFUtils.getManagedBeanValue("processScope.ETSId");
    assumes a managed bean then this may be incorrect as most likely there exist no managed bean with this name. You should be able to access the process scope from AdfFacesContext.getProcessScope(), which then returns a Map, which you call get("ETSId") on
    Frank

  • How can I get the report status?

    I am using web service to connect to BI Publisher and run the report by java code. And I have questions still unclear, anyone who knows about it please help me.
    1. Is there any method to get the report status, such as whether the report runs successfully or not.
    2. If I have a huge table that binds with the template (maybe RTF template), how about the performance of the BI publisher?
    3. I use the sample codes in the web service tutorial to run the report, but the out pdf report doesn't change when i add or remove the table data, how can I resolve it?
    Thanks very much.

    Use the web services and use this function
    getScheduledReportStatus
    you will get the status of the report ran.
    Possible values are: "Completed", "Error" "Running", "Scheduled","Suspended", "Unknown"
    It is in the table XMLP_SCHED_OUTPUT status column :)

  • ROUTINE: Still can't get this SELECT .... GROUP BY  error to go away

    Hi,
    I am testing the code below suggested on this site. When I tried it code and during my CHECK, and it gets to the GROUP BY line, and jumps back to the SELECT statement with the following message (even though DATE2 is in the GROUP BY statement):
    E:The field "/BIC/AODSSSS00~DATE2" from the SELECT list is is
    missing in the GROUP BY clause. is missing in the GROUP BY clause. Is
    missing in the GROUP BY clause. is missing in the GROUP BY clause. is
    I have played around, changing DATE2 in the GROUP By line with /BIC/AODSSSS00~DATE2 or /BIC/AODSSSS00-DATE2 or /BIC/DATE2, but still I get likewise.
    data : wa_RESULT_PACKAGE TYPE tys_TG_1.
    loop at RESULT_PACKAGE into wa_RESULT_PACKAGE.
    SELECT NUM ITEM /BIC/DATE1 DATE2 sum( QTY ) as QTY
    INTO corresponding fields of table it_TABLE1
    FROM /BIC/AODSSSS00
    where /BIC/DATE1 <= wa_RESULT_PACKAGE-DATE2
    AND NUM = wa_RESULT_PACKAGE-NUM
    AND ITEM = wa_RESULT_PACKAGE-ITEM
    GROUP BY NUM ITEM /BIC/DATE1 DATE2.
    wa_RESULT_PACKAGE-/BIC/AONTIMQTY = sum.
    MODIFY RESULT_PACKAGE from wa_RESULT_PACKAGE.
    Endloop.
    I tried the following suggestion but still I can't get the errors to go away:
    DATE2 and NUM and ITEM from the wa should be replaced with /BIC/DATE2, /BIC/ITEM, /BIC/NUM just like you did for the table fields. You don't need the /BIC/ if it's an SAP info object like 0material or 0plant. If it's an object you created, then you need to include the /BIC/.
    Thanks

    So, you tried:
    SELECT /BIC/NUM /BIC/ITEM /BIC/DATE1 /BIC/DATE2 sum(/BIC/QTY ) as QTY
    INTO corresponding fields of table it_TABLE1
    FROM /BIC/AODSSSS00
    where /BIC/DATE1 <= wa_RESULT_PACKAGE-/BIC/DATE2
    AND /BIC/NUM = wa_RESULT_PACKAGE-/BIC/NUM
    AND /BIC/ITEM = wa_RESULT_PACKAGE-/BIC/ITEM
    GROUP BY /BIC/NUM /BIC/ITEM /BIC/DATE1 /BIC/DATE2.
    Double click on /BIC/AODSSSS00 and list the field names there.  I suspect a field naming problem, but without knowing what the field names are, I can't be certain.  Also get the fields names of wa_RESULT_PACKAGE, and those defined for it_table1.
    Chances are, you're using infoobject names instead of the field names.
    matt

  • How can i get the selected portal theme

    Hi all,
    it is possible to get the current used portal theme.
    I need the path to the css file of the current selected theme.
    I've tried to get the css file over the pageContext like:
      pc.getStylesheetUrl()
    But the result of this methode is: /htmlb/mimes/ur/ur_ie6.css
    I'm loking for an url like:
    /irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal/sap_standard/ur/ur_fc_ie6.css
    Torsten

    Hello Tamas ,
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.--->
    is it possible to  have a check box in each grid  & get the selected lines in PAI of the screen ?
    regards
    prabhu

  • How can I get the selected action of content type by javascript from Firefox Options Applications?

    I works on my website, and it have to check the PDF file will be opened in which plugins
    So we have to implement some javascript to check the selected action of Content Type from Tool>Options>Application
    Do we have any javascript code to check this

    You can't check this with code that runs on the server or via JavaScript in the web page.
    Note that current Firefox version do not expose the built-in PDF Reader via the navigator.plugin array, so if you can't detect a plugin than maybe assume that the built-in PDF reader is used with Firefox version 19 and later.
    *Bug 840439 - Expose PDF.JS as a plugin navigator.plugins when enabled

  • How can I get the selected row's index of a Jlist wrapped with JScrollpane?

    the problem is that I can use getSelectedIndex() only if the JList is not wrapped in a JScrollPane.
    but in my program the JList IS wrapped in a JScrollPane.
    when I select one item of the jscrollpane I can't catch the event.
    please F1 me.
    Lior.

    What difference does it make if the list is inside a scroll pane or not? If you have a member varialbe that references the list you can call getSelectedIndex when ever you need.
        myList = new JList (...)
        someComponent.add (new JScrollPane (myList));
        //  Then later
        int sel = myList.getSelectedIndex ();And you can always be up on any selection chagnes in the list by supplying it with a ListSelecitonListener.

  • How can I get the page status light to come on?

    The page status indicator light ha been non-functional ever since I downloaded newer versions... as a result of this problem I have seldom been using Mozilla firefox because I have no confidence in secure searching! If need be, I will delete Mozilla Firefox altogether!

    When you had to reset and secure the router that provides the wireless network, does this mean that you changed either the wireless security setting or wireless network password?
    If yes, then you will need to reconfigure the AirPort Express and provide it with those new settings so that it can join the wireless network correctly.

Maybe you are looking for

  • ORA -01115 error in db13 checkdb

    Hi expert , i am new to this fouram i have ora-01115 error in sap oracle 9i database , Please help me to solve the problem . I am using ECC 5.0 ,win2k3 enterprise edition ,Oracle 9i could anybody explain me what the relation of oracle block segment ,

  • Getting music out of my iPod to computer

    Can someone help me? recently my computer's HD died and I replaced,formated,and set it all up,but when I installed the new iTunes 7,I lose my mind.I don't see how I can get my music out of my iPod mini and into the new iTunes library. The only music

  • Problem using CS5

    I recently uninstalled CS3 before deactivating.  I installed CS5 but I keep getting error #1.  I used the cleaner tool also but to no avail.  Any advioce would be helpful. hanks

  • Adjustment layer on top of 3d layer

    Hi all, how do you make ae adjustment layer work with 3d layer? For example I have a red colour solid layer (with 3d turn on) and on top of it i have a adjustment layer with hue and saturation effect added, but when i play with the effect slider the

  • Reporting info to LMS?

    Hi, Can someone tell me all about or point me to where I can get the info on how and what data gets "reported" to an LMS? I don't see anywhere that I can pass a variable. I also what to know when the info gets set.  I am assuming it is all gathered a