Combo selection - Trouble

Hi guys,
Have made a small test application to tell my problem.
Have rendered a table with a comboBox.Everything works fine,the way I wanted it to be, apart from the following things.
[1]
When the user Doubleclicks on one of the combocells,the comboitem in the combobox is already displayed on the tablecell.I dont want it to be like that.
I want the comboitem to be displayed on the tablecell only when the user explicitly goes and selects the comboitem.If the user doublciks on the cell as said before,the old cell value should remain.
[2]
How to catch a combo close up event when the user explicitly selects an item from the combo.Because I want to do something when the user does so....
see Pic:
http://i337.photobucket.com/albums/n399/turniphorse/ComboSelection.jpg
Iam attaching the code(running) also along with this....
Any help is greatly appreciated.
Thanks.
package set.test;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Point;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Vector;
import javax.swing.DefaultCellEditor;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
public class TableCellColour extends JPanel {
         private int tableHilightedRow, tableHilightedCol;
         JTable table = null;       
         private Vector rowData;
          private Vector columnNames;
          private JButton jButton = null;  //  @jve:decl-index=0:visual-constraint="348,164"
public TableCellColour(){
     super(new GridLayout(1,0));
     rowData = new Vector();
     columnNames = new Vector();
     this.columnNames.addElement("Entry Type");
     this.columnNames.addElement("First");
     this.columnNames.addElement("Last");
     this.tableHilightedRow = -1;
     this.tableHilightedCol = -1;
     table = new JTable(new MyTableModel(rowData,columnNames));
     addRows();
     table.setPreferredScrollableViewportSize(new Dimension(500,70));     
     JScrollPane scrollpane = new JScrollPane(table);
     //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    //table.setSelectionBackground(Color.YELLOW);
    table.addMouseListener(new MouseHandler());     
    setUpStartEndRangeColumn(table);
        add(scrollPane);
        add(getJButton());
private void addRows(){
     Vector row = new Vector();     
     row.addElement("");
     row.addElement("555");
     row.addElement("566");
     MyTableModel myModel = (MyTableModel) this.table.getModel();
     myModel.addRow(row);
     Vector row1 = new Vector();
     row1.clear();
     row1.addElement("");
     row1.addElement("655");
     row1.addElement("666");     
     myModel.addRow(row1);
     Vector row2 = new Vector();
     row2.clear();
     row2.addElement("");
     row2.addElement("755");
     row2.addElement("766");     
     myModel.addRow(row2);
     Vector row3 = new Vector();
     row3.clear();
     row3.addElement("");
     row3.addElement("855");
     row3.addElement("866");     
     myModel.addRow(row3);
public void setUpStartEndRangeColumn(JTable table){
     // These are the combobox values          
     JComboBox comboBox1 = new JComboBox();
     comboBox1.addItem("First");
    //sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
     //JComboBox comboBox = new JComboBox(values1);     
     MyComboBoxEditor cellEditor = new MyComboBoxEditor(comboBox1);
     TableColumn startRange = table.getColumnModel().getColumn(1);
     //startRange.setCellEditor(new DefaultCellEditor(comboBox));
     startRange.setCellEditor(cellEditor);
     MyComboBoxRenderer  comboRenderer= new MyComboBoxRenderer();
     DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
     startRange.setCellRenderer(comboRenderer);  
     JComboBox comboBox2 = new JComboBox();
     comboBox2.addItem("Last");
     TableColumn endRange = table.getColumnModel().getColumn(2);
     MyComboBoxEditor cellEditor2 = new MyComboBoxEditor(comboBox2);
     endRange.setCellEditor(cellEditor2);
     DefaultTableCellRenderer renderer2 = new DefaultTableCellRenderer();
     endRange.setCellRenderer(comboRenderer);
public void setTableRowColSelection() {
     if (tableHilightedRow != -1)
          table.setRowSelectionInterval(0, tableHilightedRow);
     if (tableHilightedCol != -1)
          table.setColumnSelectionInterval(0, tableHilightedCol);
public class MyTableModel extends DefaultTableModel{
     public MyTableModel(Vector rowDataSet, Vector columnNamesSet) {
          super(rowDataSet, columnNamesSet);
     public Class getColumnClass(int columnIndex) {
          return getValueAt(0, columnIndex).getClass();
     public boolean isCellEditable(int row,int col){
             if(col<1)
               return false;
               else
                    return true;
     public void setValueAt(Object value,int row,int col){
          super.setValueAt(value, row, col);
public class MyComboBoxEditor extends DefaultCellEditor {
     private static final long serialVersionUID = 1L;
     public MyComboBoxEditor(JComboBox combo) {
         super(combo);         
         setClickCountToStart(2);         
   public void setClickCountToStart(int count)  {
        super.setClickCountToStart(count);       
public class MyComboBoxRenderer extends JComboBox implements TableCellRenderer {
     int highlightRow = -1;
     int highlightCol = -1;
    public MyComboBoxRenderer() {
       super();
       setOpaque(true);     
    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
          if (row == highlightRow && column == highlightCol) {
               setBackground(Color.yellow);
          else if (isSelected) {
              // setBackground(Color.yellow);
                setForeground(table.getSelectionForeground());
              super.setBackground(table.getSelectionBackground());
          } else
               //setBackground(Color.yellow);
                setForeground(table.getForeground());
                setBackground(table.getBackground());               
          setBorder(null);          
          removeAllItems();
          addItem( value );          
          return this;
    public void setHighlightCell(int row, int col) {
          highlightRow = row;
          highlightCol = col;
          tableHilightedRow = highlightRow;
          tableHilightedCol = highlightCol;               
          setTableRowColSelection();
class MouseHandler extends MouseAdapter {
    public void mousePressed(MouseEvent e) {
        JComboBox comp = null;
        Point p = e.getPoint();
         int row = table.rowAtPoint(p);
          int col = table.columnAtPoint(p);          
          int click = e.getClickCount();
          MyComboBoxRenderer render = (MyComboBoxRenderer) table.getCellRenderer(row, col);
          String eVal = (String)table.getValueAt(row,col);
          comp = (JComboBox) render.getTableCellRendererComponent(table,eVal,true,true,row,col);
          if(click==1&& (row != -1) && (col != 0))
               render.setHighlightCell(row, col);
       table.repaint();               
private static void  createAndShowGUI(){
     JFrame frame = new JFrame("TableComBoBox");
     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     TableCellColour newContentPane = new TableCellColour();     
     newContentPane.setOpaque(true);
     frame.setContentPane(newContentPane);
     frame.pack();
     frame.setVisible(true);
* This method initializes jButton     
* @return javax.swing.JButton     
private JButton getJButton() {
     if (this.jButton == null) {
          jButton = new JButton();
          jButton.setSize(new Dimension(176, 29));
          jButton.addActionListener(new java.awt.event.ActionListener() {
               public void actionPerformed(java.awt.event.ActionEvent e) {
                    table.getModel().setValueAt("Test",0, 1);
                    table.repaint();
     return jButton;
public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
        public void run() {           
           createAndShowGUI();
}

[2] - Use a TableModelListener - whenever the data in the cell is changed a TableModel event is fired.

Similar Messages

  • Problem  in Combo Select

    Hi,
    In my form i have a combo. My requirement is, for example i load 5 data A,B,C,D,E in combo. First i select the 'A' and load the corresponding elements in the matrix, next i select 'B' and the corresponding elements of 'B'  was loaded in matrix now again i select 'A ' it should check 'A' is already selected and the corresponding elements are already displayed in matrix again the elements of 'A' should not be loaded in matrix. Plz tell how to check this.
    Thanks in Advance.
    Regards,
    Madhavi

    Hi Madhavi,
    here are the main parts of my little example.
    Some hints:
    The form is managed in a shared class (only one form at a time)
    The Matrix is loaded via a DataTable
    The Matrix is ReLoaded on every time the "ABCDE-Combo" is selected (except the value is already selected)
    In the example I load Businesspartners into matrix where their CardName starts with A or B or....or E (you must adapt it for your needs)
    SboCon.SboDI is the SAPbobsCOM.Company
    SboCon.SboUI is the SAPbouiCOM.Application
    Some global vars (initialize them somewhere when the form is opened!):
        Private Shared oForm As SAPbouiCOM.Form
        Private Shared oUds As SAPbouiCOM.UserDataSources
        Private Shared oDts As SAPbouiCOM.DataTables
        Private Shared oDtBp As SAPbouiCOM.DataTable
        Private Shared oMtxBp As SAPbouiCOM.Matrix
        Private Shared SelVals As System.Collections.ArrayList ' The values of the combo which already selected by the user
    Init the vars somewhere (where you normally do this) on form load:
                oForm = '...set it in your way
                oDts = oForm.DataSources.DataTables
                oUds = oForm.DataSources.UserDataSources
                oMtxBp = oForm.Items.Item("MTX_BP").Specific
               ' DataBinding and related:
                '### Data Tables
                oDts.Add("DT_BP")
                '### UserDataSources
                '# ABCDE Combo:
                oUds.Add("UDS_SELBP", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100)
                oForm.Items.Item("CBX_SELBP").Specific.databind.setbound(True, "", "UDS_SELBP")
                '### Fill ABCDE Combo
                oForm.Items.Item("CBX_SELBP").DisplayDesc = True
                oCbx = oForm.Items.Item("CBX_SELBP").Specific
                oCbx.ValidValues.Add("0", "Please select...")
                For val As Integer = Asc("A") To Asc("E")
                    oCbx.ValidValues.Add(Chr(val), "Load " & Chr(val) & " BP")
                Next
                oUds.Item("UDS_SELBP").ValueEx = "0"
    The Combo Select Event:
                If pVal.ItemUID = "CBX_SELBP" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT Then
                    If Not pVal.BeforeAction Then
                        If oUds.Item("UDS_SELBP").ValueEx != "0" Then
                            Dim oCbx As SAPbouiCOM.ComboBox = oForm.Items.Item("CBX_SELBP").Specific
                            If SelVals.Contains(oUds.Item("UDS_SELBP").ValueEx) Then
                                ' BP already selected - do nothing
                                SboCon.SboUI.StatusBar.SetText("Already selected!")
                            Else
                                If Not SelVals.Contains(oUds.Item("UDS_SELBP").ValueEx) Then
                                    SelVals.Add(oUds.Item("UDS_SELBP").ValueEx)
                                End If
                                Dim query As String
                                oDtBp.Clear()
                                oMtxBp.Clear()
                                ' Build query for BPs where their names starts with the Combo-Value
                                query = "SELECT CardCode, CardName FROM OCRD WHERE "
                                For i As Int16 = 0 To SelVals.Count - 1
                                    If i > 0 Then query &= " OR "
                                    query &= "CardName LIKE '" & SelVals(i) & "%' "
                                Next
                                query &= " ORDER BY CardName"
                                ' load the MTX via DataTable (reloaded every time based on collected combo-values)
                                oDtBp.ExecuteQuery(query)
                                With oMtxBp.Columns
                                    ' Zeilen-Nr.
                                    .Item("0").DataBind.Bind("DT_BP", "CardCode")
                                    .Item("1").DataBind.Bind("DT_BP", "CardName")
                                End With
                                oMtxBp.LoadFromDataSource()
                                oMtxBp.AutoResizeColumns()
                                SboCon.SboUI.StatusBar.SetText(oUds.Item("UDS_SELBP").ValueEx & " added!", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                            End If
                            ' reset Combo to "Please select..."
                            oUds.Item("UDS_SELBP").ValueEx = 0
                        End If
                    End If
                End If
    ATTENTION: REPLACE the "!=" with less (<)/greater(>) symbol, they're not shown in ths forum
    I hope I didn't forget sth. - here it works..
    Cheers,
    Roland
    Edited by: Roland Toschek on Sep 25, 2008 11:54 AM

  • How to set condition in choose from list based on the combo selection

    Dear Members,
         i have a requirement to filter the item based on the itemgroup. After choosing the itemgroup in the dropdown list i have to filter the item for the particular group in the choose from the list.since i have tried in the combo select it doesnt work out for me.any body can suggest me is it doable. if so pls tell me the work around.
    My coding is as follows..
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    if pval.itemUID="Cmb"
                                objChooseCollection = objForm.ChooseFromLists
                                objChooseFromList = objChooseCollection.Item("CFL1")
                                objConditions = objChooseFromList.GetConditions()
                                objcondition = objConditions.Add()
                                objcondition.Alias = "itmsgrpcod"
                                objcondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                                objcondition.CondVal = Form.items.item("Cmb").specific.selected.value
                                objChooseFromList.SetConditions(objConditions)
    End if
    With Regards,
    jai.
    Edited by: JaiShankarRaman on Dec 23, 2009 10:47 AM

    Hello,
    Following is a code sample which I am using:
            Dim oForm As SAPbouiCOM.Form
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oChooseFromList As SAPbouiCOM.ChooseFromList
            Dim oConditions As SAPbouiCOM.Conditions
            Dim oCondition As SAPbouiCOM.Condition
            Dim CodeType As Integer
            Try
                oForm = oPayOn.SBO_Application.Forms.GetForm(CflEvent.FormTypeEx, CflEvent.FormTypeCount)
                oMatrix = oForm.Items.Item("AC_MATRIX").Specific
                oChooseFromList = oForm.ChooseFromLists.Item("ACC_CFL1")
                CodeType = oMatrix.Columns.Item("AC_MC00").Cells.Item(CflEvent.Row).Specific.Selected.Value
                oConditions = oChooseFromList.GetConditions
                If oConditions.Count > 0 Then
                    oCondition = oConditions.Item(0)
                Else
                    oCondition = oConditions.Add
                End If
                oCondition.Alias = "U_CodeType"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = CodeType
                oChooseFromList.SetConditions(oConditions)
            Catch ex As Exception
                'oPayOn.SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
            End Try
        End Sub
    I am calling this in the CFL event - before action. So when the user clicks on CFL button - but before it opens - this code is called and the condition is applied. Here AC_MC00 is a combo column in a matrix.
    Regards
    Rahul Jain

  • Combo Select in Matrix

    Hi to all,
    I have a problem in combo Select in Matrix. I have a form with A matrix and One Column as a combobox. This Column is bind to one of the field of Table.
    I have loaded the combo with valid values, but when i select the combo item, it is not set in that column, i.e No value.
    regards
    Bikram

    Hi,
    Have you added a row to the matrix after initialisation of the column with the valid value ? if not add a row to the matrix. Check the below code
    SAPbouiCOM.Matrix oMatrix = null;
    SAPbobsCOM.Recordset oRecordset = null;
    LoadFromXML("frmLMM.srf");
    Global.oForm = Global.SboApplication.Forms.Item("frmLMM");
    oRecordset = (SAPbobsCOM.Recordset)(Global.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));
    oRecordset.DoQuery("select UnitDisply,UnitName from owgt");
    oRecordset.MoveFirst();
    oMatrix = (SAPbouiCOM.Matrix)(Global.SboApplication.Forms.Item("frmLMM").Items.Item("MtrxSrvc").Specific);
    for (int i = 0; i < oRecordset.RecordCount; i++)
                       oMatrix.Columns.Item("colUom").ValidValues.Add(oRecordset.Fields.Item("UnitDisply").Value.ToString(),
                       oRecordset.Fields.Item("UnitName").Value.ToString());
                        oRecordset.MoveNext();
    oMatrix.AddRow();
    Regards,
    Noor

  • When combo selected, user form sholud be open

    Hi
    In system form, when value is selected in the combo box, at same time  user form should be opened. what is the coding for this process? can anyone help me..
    Regards
    Bhuvana

    Hi Bhuvana
    in the combo select event use this code to get your User form to load
    LoadFromXML("solution.srf")(Name of the srf file)
    oform = oapp.Forms.Item("solut")(FormUID)
      service_solution() (databinding)
    this is an easy way to load a form the for this use should have LoadFromXml() function like this
    Public Sub LoadFromXML(ByVal FileName As String)
            Dim oXmlDoc As New Xml.XmlDocument
            Dim sPath As String
            Try
    sPath = IO.Directory.GetParent(Application.StartupPath).ToString
                oXmlDoc.Load(sPath & "\" & FileName)
                oapp.LoadBatchActions(oXmlDoc.InnerXml)
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    if this helps do reward points
    Edited by: Cool Ice on Jul 28, 2008 12:44 PM

  • Combo select

    HI All,
    I have one requirement that is we had to display data depending up on our combo select
    That is if we select one item in a combo it should display items accordingly in a matrix. It means if we are having 5 columns.
    Thanx and Regards,
    krishna.v

    Hi,
    Use the Combo Select Event and refill the matrix.
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    If pVal.ItemUID = "cmbApStats" Then
               'Code for Refilling the matrix
    End IF
    Hope it helps.
    Regards,
    Vasu Natari.

  • Combo selection problem

    Hello,
    I have a problem with a combo box. I've uploaded the combobox with data from a table:
    string sSQL = "SELECT BankCode, BankName FROM ODSC";
    oRs.DoQuery(sSQL);
    oRs.MoveFirst();
    for (int i = 0; i < oRs.RecordCount; i++)
    oComboBox.ValidValues.Add(oRs.Fields.Item("BankCode").Value.ToString(), oRs.Fields.Item("BankName").Value.ToString());
      oRs.MoveNext();
    In the variable dfltbank, I have a bank which i want to select in the combobox:
    oComboBox.Select(dfltbank, APbouiCOM.BoSearchKey.psk_ByValue); (in the constructor of the class).             
    I also have an item event on this combobox et_COMBO_SELECT.
    The problem is that event gets triggers when the form is loading because of my selection above and i get "Object not set to an instance of an object" (the class the forms load in is null, because the event got triggered before the constructor of the class finished).
    How can i solve this?
    Thank you in advance,

    Have you tried checking for the pval.InnerEvent status?  That will help to ferret out events that happen internally in code vs events that are caused by the user explicitly.
    If pval.InnerEvent = True then
      'do this
    Else
      'do that
    End If

  • Depend on first combo selection, second combo should disable and enable

    hi
    i am using jstl and jsp. I have two combos , first combo has 4 items
    when clicking the 3rd item and 4 th items second combo should
    be disabled( that means he should not select second combo items)
    combo items are not hardcoded they are polulating by mapping through hibernate to database. Please help me how to do it by
    using javascript or jstl conditions.
    can any body help me please...this is urgent
    thanks
    jalandhar
    Message was edited by:
    jalandhar
    Message was edited by:
    jalandhar

    Hi,
    This is not a javascript forum, please google for a javascript forum. (Javascript is not java)
    Kaj

  • CS2 SELECTION TROUBLE

    I am in CS2 on an XP PROF machine, 500 GB HD, 3 GB RAM. Everything is working except the rectangular select tool: after selecting a rectangle on a one-layer image, the cursor stays as a little cross instead of the moving arrow that I am accustomed to. So I cannot move the selection, clicking the mouse just starts another rectangle.
    I repaired CS2 from the Control Panel, then updated CS2 for a long time, etc. When through, same trouble remains.

    Edwin,
    First reset the preferences. Shut down PS and go into the My Documents\Application Data\Andobe\Photoshop... path and find the (...)preference.psp file.
    Delete that. Your PS should then behave as factory default.
    Since this file is created upon first launch, and not during install, it's going to be there after a reinstall.
    Also check the forum FAQ about this.
    Rob

  • Combo select value

    I have a problem with comobox select. I have build a form with 3 comboboxes. I added to the form a button for clear all the controls values in the form. When I am in the find mode nad i want to clear the combobox selected value it does not clear the value. and this is only when I am in find mode.
    I have also added the empty value to the combo datasource.
    the code is something like this:
    oCombo.Select(string.Empty, SAPbouiCOM.BoSearchKey.psk_ByValue);
    string selectedValue = _cmbCausale.Selected.Value;
    The problem is that  when I am in find mode the selectedValue it is not string.Empty but it is the last selected value from the form.
    does any one have any suggestion?

    HI,
    Set the datasource value to clear the combobox, then it will work.
    Regards
    J.

  • [915 Series] 915P Combo installation trouble

    I am attempting to install a 915P Combo board with a Pentium 4 530J 3.0/800/1G processor. At the moment I have only 1 DIMM, the processor, the power supply and the case power switch and speaker connected to the board. The memory, power supply and case are known to function properly. (I experienced the same symptoms with my system fully connected, and the system did not post.) Here is the situation:
    After pressing the power button I hear one long beep and six short beeps. This combination is not listed in the Basic Troubleshooting Guide. When I had the D-LED installed the system hung with the bottom left and top right lights green and the other two orange. This combination is indicated as the processor read indication.
    Any thoughts? Thanks.
    EDIT: the one long beep and six short beeps might be eight short beeps; it's hard to tell. Eight short beeps is listed as indicated a display error, so I tried reinstalling my brand-new PCIx16 card. No luck.

    AMI BIOS (American Megatrends Inc) don't have long beeps, just short beeps.
    in ur case we have
    6 Beeps 8042 - A20 Failure
    8beeps Display memory read/write failure
    So you must install your VGA card in another system.
    AWARD BIOS have long beeps..
    1 long 9 short, BIOS ROM error...
    Just make sure your PSU is ok, Clear the BIOS, and send this mainboard for a check

  • On combo selection, components visibility need to change

    1) I have one combobox --> with values 1, 2, 3
    2) If i am selecting 1, one textfield need to be shown
    3) If i am selecting 2, one calendar need to be shown
    4) If i am selecting 3, 2 textfields need to be shown
    How it can be achived using JSF/Richfaces package

    Hello DJChase,
    first off, the maximum amount of video (incl. slideshow and DVD menu) for an SL DVD is two hours, so wether you will be able to fit in everything will depend on the overall length of everything.
    When exporting from FCP you should generally export as QT movie and not use the QT Conversion option, as this usually degrades the video somewhat (even if the export settings match the sequence settings).
    Question here: if you're using FCP, why don't you create the DVD using DVDSP/Compressor? The output quality will surely surpass that of iDVD.
    hope this helps
    mish

  • Quick Selection trouble

    I get the wheel of doom while trying to make a quick selection. This happens with both my mouse and tablet. This hasn't always happened, though. Just recently. I have PS CC.

    I believe the 'wheel of doom' or 'spinning pinwheel of doom' is a Mac thing, and I don't do Macs, but I'll bump your post back the page.
    Anyone?

  • Selection trouble with JTrees

    Hi,
    I have a JTree that launches an internal frame on selection of a node.
    The problem is that after the selecion of a node, it can't be reselected unless you make another selection. This is very annoying as it launches unnecessary frames.
    The TreeSelectionListener interface contains a single method, which is
    valueChanged(TreeSelectionEvent),
    called only when the selection changes.
    Anyone know how I could enable the reselection of a selected node?
    Thanks.

    The API documentation for JTree has a section that starts like this:
    "If you are interested in detecting either double-click events or when a user clicks on a node, regardless of whether or not it was selected, we recommend you do the following..."

  • Combo select  event is very show?

    when i select value by combox  it wiil very show. please help me
    if i select order no=2  aginst when another value selected  its very show
    please help me.
    If (pVal.ItemUID = "OrVal") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) Then
                Dim sSQL As String
                'Dim sname As String
                Dim ocombo3 As SAPbouiCOM.ComboBox
                ocombo3 = oForm.Items.Item("OrVal").Specific   ''''' combox of order no
                rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                sSQL = "SELECT T0.[DocDate],T1.[Price],cardname, U_calM,U_MTrip,U_WghT ,U_Ttype FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocEntry  ='" & Trim(ocombo3.Selected.Value) & "' "
                rs.DoQuery(sSQL)
                oEdittext = oForm.Items.Item("OrdtVal").Specific
                oEdittext.String = Format(rs.Fields.Item("DocDate").Value, "ddMMyy")
                oForm.Items.Item("CustVal").Specific.value = rs.Fields.Item("cardname").Value
                oForm.Items.Item("Sitem").Specific.value = rs.Fields.Item("Price").Value
                oForm.Items.Item("CalVal").Specific.string = rs.Fields.Item("U_calM").Value
                oForm.Items.Item("MVal").Specific.string = rs.Fields.Item("U_MTrip").Value
                oForm.Items.Item("WVal").Specific.value = rs.Fields.Item("U_WghT").Value
                oForm.Items.Item("TVal").Specific.string = rs.Fields.Item("U_Ttype").Value  
            End If

    when i select value by combox  it wiil very show. please help me
    if i select order no=2  aginst when another value selected  its very show
    please help me.
    If (pVal.ItemUID = "OrVal") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) Then
                Dim sSQL As String
                'Dim sname As String
                Dim ocombo3 As SAPbouiCOM.ComboBox
                ocombo3 = oForm.Items.Item("OrVal").Specific   ''''' combox of order no
                rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                sSQL = "SELECT T0.[DocDate],T1.[Price],cardname, U_calM,U_MTrip,U_WghT ,U_Ttype FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocEntry  ='" & Trim(ocombo3.Selected.Value) & "' "
                rs.DoQuery(sSQL)
                oEdittext = oForm.Items.Item("OrdtVal").Specific
                oEdittext.String = Format(rs.Fields.Item("DocDate").Value, "ddMMyy")
                oForm.Items.Item("CustVal").Specific.value = rs.Fields.Item("cardname").Value
                oForm.Items.Item("Sitem").Specific.value = rs.Fields.Item("Price").Value
                oForm.Items.Item("CalVal").Specific.string = rs.Fields.Item("U_calM").Value
                oForm.Items.Item("MVal").Specific.string = rs.Fields.Item("U_MTrip").Value
                oForm.Items.Item("WVal").Specific.value = rs.Fields.Item("U_WghT").Value
                oForm.Items.Item("TVal").Specific.string = rs.Fields.Item("U_Ttype").Value  
            End If

Maybe you are looking for

  • object is not working in CDATA in XML with flash

    hi, in my xml file I use CDATA to insert html code. I have put <object >.. .some flash movie file. .. . </object>. But in front end , I did not get any video played. Why <object> html element does not support + what would be next solution to show my

  • Open Vendor Items by Date

    Hi, We want to be able to produce a list of open items that have been on order from the vendor for more than three months. I'm trying to write a query but I'm not sure how to handle the date range. I think I have the first part correct, as it seems t

  • Webex in a conference room

    We want to use Webex in a small conference room. The current setup is 3 tables in a U shape. The laptop is at the center of the front table with 2 usb cameras each pointing at the side tables. The problem we are having is switching between cameras. I

  • Running Swing programs on Mac system

    Hi, I am using j2sdk1.4 version (jre 1.4) on windows system and developed application using swing. I wanted to test this applicaion on Max 8.1 later. will this work or I need to install different version of j2sdk on windows (which is supprted by mac

  • After editing in photoshop cs6 my photoshop edited image does not appear in Lightroom 4

    after editing in photoshop cs6 my photoshop edited image does not appear in Lightroom 4 can anyone help?