PROBLEM IN JCHECKBOX FOCUS

hi
i don't get focus on checkbox.I need focus on the checkbox not on the text with it.what should i do?i sending my code please help me.
public class SECOND extends javax.swing.JFrame {
public SECOND() {
initComponents();
setSize(500, 500);
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
private void initComponents() {
jTextField1 = new javax.swing.JTextField();
jCheckBox1 = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
getContentPane().setLayout(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
getContentPane().add(jTextField1);
jTextField1.setBounds(70, 60, 170, 21);
getContentPane().add(jCheckBox1);
jCheckBox1.setBounds(80, 120, 70, 15);
jButton1.setText("OK");
getContentPane().add(jButton1);
jButton1.setBounds(100, 170, 90, 25);
pack();
public static void main(String args[]) {
new SECOND().show();
private javax.swing.JButton jButton1;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JTextField jTextField1;

Hi,
There's a number of ways to deal with this problem:
1. Write an anonymous class that overides paintComponent() in the JCheckBox.
2. Write an explicit class that extends JCheckBox and overrides paintComponent().
3. Write a class that extends BasicCheckBoxUI and overrides paintFocus(). Tell the UIManager to use this class for all JCheckBoxes.
Which method should you use?
1 if there is only one JCheckBox in the whole application that you wish to have this functionality. (I personally prefer not to use anonymous classes).
2 if there is a number of places you need this behaviour.
3 If you would like every instance of JCheckBox (even its subclasses) to have this functionality.
Hope that helps,
Muel.

Similar Messages

  • Problems with the Focus in different JTables

    Hello,
    I got the following problem.
    First of all, I use a Splitpane to show 8 different tables. Four of them (tables 1-4) are placed in the left part of the Splitpane. The other four tables (5-8) are on the right hand side.
    The four tables on the left got their own TableCellRenderer and the four tables on the right got also their own TableCellRenderer.
    If i load the side, I want the focus to be in table 2 and in table 5. How can i do that? Their is never a focus in any of them at the beginning but I need them in TWO of them.
    Secondly, I don't know how I can leave the one focus between tables 1-4 AND tables 5-8????
    I can click through tables 1-4 without any problems but the focus in one of the tables on the right side disappears. The same on the other side if I click through tables 5-8?
    Can anyone give me an answer? I am looking for hours already and I am so frustrated right now.
    Thank you so much....

    http://www.bulletsandbones.com/GB/GBFAQ.html#recordlinein

  • Problem with JCheckBox in a JTable

    Hello,
    I have a JTable with JCheckBox as Editor for boolean values.
    I added a ListSelectionListener on that JTable.
    My problem is :
    when I click on a cell which have a JCheckBoxEditor, there is only one event generated : the one which unselect the row previously selected.
    So i can't answer the selection.
    what could have append ?
    thanks a lot.
    fleur.

    hi,
    I have no custom editor for this table.
    here is my code :
    public VDEComposant(Locale langue,InterfaceModeleur listener,Composant composant,int largeur) {
    super(langue,listener,largeur);
    this.setLayout(new BorderLayout());
    _modele=listener.getModele();
    _composantCourant=composant;
    this.addComposantsListener((ComposantsListener)listener.getGestionnaire());
    construitBarreOutils();
    setNbLigne1(this.listeComposant(composant).size());
    int m=0;
    if (composant==Composant.COMPOSANT){
    _donCompPereApTM=this.creeModeleDonnee1(composant);
    _donCompPereApTM.addTableModelListener(this);
    setTableau1(new JTable(_donCompPereApTM));
    m=1;
    else{
    if (composant.getPere()==Composant.COMPOSANT){
    _donCompApTM=creeModeleDonnee1(composant);
    _donCompApTM.addTableModelListener(this);
    setTableau1(new JTable(_donCompApTM));
    else {
    _donCompUtTM=creeModeleDonnee1(composant);
    _donCompUtTM.addTableModelListener(this);
    setTableau1(new JTable(_donCompUtTM));
    getTableau1().addMouseListener(((OngletDonnees)((OngletDonnees)getIHM().getOngletDonnees())).getOngletComposants());
    MultipleComboBoxCellEditor editor = new MultipleComboBoxCellEditor(new JComboBox());
    getTableau1().getColumnModel().getColumn(4+m).setCellEditor(editor) ;
    getTableau1().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    getTableau1().getSelectionModel().addListSelectionListener(this);
    Dimension d1 = new Dimension(_largeur, getNbLigne1()*16);
    JScrollPane sc1 = new JScrollPane(getTableau1());
    sc1.setViewportView(getTableau1());
    if((composant.getPere()!=null)&&(composant.getPere()!=Composant.COMPOSANT)){
    this.add(_outils,BorderLayout.NORTH);
    String s="";
    if((composant.getPere()==null)||(composant.getPere()==Composant.COMPOSANT)){
    String sc="";
    if(composant==Composant.COMPOSANT_IMAGE){
    sc=" "+_ressources.getString("images");
    if(composant==Composant.COMPOSANT_LINEAIRE){
    sc=" "+_ressources.getString("lineaires");
    if(composant==Composant.COMPOSANT_METAD){
    sc=" "+_ressources.getString("lotdonnees");
    if(composant==Composant.COMPOSANT_NGS){
    sc=" "+_ressources.getString("nongraphiques");
    if(composant==Composant.COMPOSANT_SURFACIQUE){
    sc=" "+_ressources.getString("surfaciques");
    if(composant==Composant.COMPOSANT_SYMBOLIQUE){
    sc=" "+_ressources.getString("symboliques");
    s=_ressources.getString("liste_composant")+sc;
    else{
    s=_ressources.getString("description_composant");
    JLabel lab = new JLabel(s,JLabel.CENTER);
    JPanel inter = new JPanel(new GridLayout(1,1));
    inter.add(lab);
    inter.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(),BorderFactory.createEtchedBorder()));
    Box boite1 = Box.createVerticalBox();
    boite1.add(inter);
    boite1.add(sc1);
    _inter.add(boite1);
    //ajout du deuxieme tableau
    _donAttCompTM=this.creeModeleDonnee2(composant);
    _donAttCompTM.addTableModelListener(this);
    setTableau2(new JTable(_donAttCompTM));
    getTableau2().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    getTableau2().getSelectionModel().addListSelectionListener(this);
    getTableau2().addMouseListener(((OngletDonnees)((OngletDonnees)getIHM().getOngletDonnees())).getOngletComposants());
    //ComboBox pour saisir le type de l'attribut
    _typeA = new JComboBox();
    _typeA.addItem(TypeEtendu.DATE.getNom());
    _typeA.addItem(TypeEtendu.DOMAINE.getNom());
    _typeA.addItem(TypePrimitif.ENTIER.getNom());
    _typeA.addItem(TypePrimitif.LOGIQUE.getNom());
    _typeA.addItem(TypePrimitif.REEL.getNom());
    _typeA.addItem(TypePrimitif.TEXTE.getNom());
    (getTableau2().getColumnModel().getColumn(3)).setCellEditor(new DefaultCellEditor(_typeA));;
    //renderer pour la colonne des nom qui indique en gras l'attribut identifiant
    getTableau2().getColumnModel().getColumn(1).setCellRenderer(new AttributTableCellRenderer(_composantCourant));
    Dimension d2 = new Dimension(_largeur ,(getNbLigne2()*16));
    JScrollPane sc2 = new JScrollPane(getTableau2());
    sc2.setViewportView(getTableau2());
    _inter.createVerticalStrut(16);
    inter = new JPanel(new GridLayout(1,1));
    lab = new JLabel(_ressources.getString("attributs"),JLabel.CENTER);
    inter.add(lab);
    inter.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(),BorderFactory.createEtchedBorder()));
    Box boite2=Box.createVerticalBox();
    boite2.add(inter);
    boite2.add(sc2);
    _inter.add(boite2);
    if((composant.getPere()!=null)&&(composant.getPere()!=Composant.COMPOSANT)){
    this.add(_inter,BorderLayout.CENTER);
    else{
    this.add(_inter,BorderLayout.NORTH);
    public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting()) return;
    ListSelectionModel lsm =(ListSelectionModel)e.getSource();
    if (lsm.isSelectionEmpty()) {
    else {
    int ligneSel = lsm.getMinSelectionIndex();
    if(e.getSource()==getTableau2().getSelectionModel()){
    String alias = (String) _donAttCompTM.getValueAt(ligneSel,1);
    attribut = composantCourant.getAttribut(alias);
    else if(e.getSource()==getTableau1().getSelectionModel()){
    VectorTableModel vtm = null;
    int i = 0;
    if(_donCompApTM != null){
    vtm = _donCompApTM;
    if(_donCompPereApTM != null){
    vtm = _donCompPereApTM;
    i =1;
    if(vtm != null){
    String alias = (String) vtm.getValueAt(ligneSel,i);
    composantSelectionne= modele.getComposant(alias);
    else{
    composantSelectionne=composantCourant;
    I hope it make sens,
    thanks.

  • Problem restoring applet focus

    As an exercise I wrote a Tetris clone in Swing. The game itself is fine, and runs without problems when run standalone in a JFrame. Next, I tried making an applet version of the game. Mostly the same code, just wrapped inside of a JApplet instead of a JFrame. Here's where the problems started.
    The applet version seems to run fine in Firefox as long as you do not open a new tab, or click on another already-opened tab. If you go to another tab, then back to the applet's tab, and try clicking on the applet, focus is never regained (or so it seems - the applet no longer responds to keypresses).
    In other words:
    1. I load the applet in a new tab in Firefox. I can click on the game and play it like I'd expect.
    2. I click on some other tab I already have open.
    3. I click back on the Tetris applet's tab.
    4. I click on the applet and try to start playing again. The applet doesn't respond to any keypresses, no matter how hard I try.
    What am I missing here? Hopefully this sounds familiar to somebody. I would post some code but the game is made up of several source files, and I was hoping someone would spot the obvious for me just from a description.
    FWIW, using IE7 and Safari, things work as expected - I can switch tabs, then come back and play the game fine. (Although with Safari, sometimes I really have to work to get the applet focus in the first place, but I think that's a different issue).
    Thanks for any help!

    thorsti16 wrote:
    Hi,
    i have a similar focus problem. After a click of a Tab and back the focus for keyboard is gone.
    I use a shell which has embedded th IE control. My applet has no such problems with jre 1.4.2_10 and older vms.
    Which jre version do you use?On Windows it was 1.6.0_03. On OS X, 1.5.0_07. On Fedora Linux, I'm not sure, but it was some release of 1.6. With all three configurations, Firefox had this problem.
    Could you please check your applet with 1.4.2_10 ? Perhaps we are facing the same problem.
    thorstenUnfortunately my code uses Java 5 features, so I can't test with 1.4.x. I might "backport" to 1.4 just to see if things work that way. But I think I found a solution. Try something like this in your applet's init() method:
    applet.setFocusable(false);
    gamePanel.setFocusable(true);
    gamePanel.setFocusCycleRoot(true);where above, "gamePanel" is the JPanel (or whatever) you added to the applet's content pane, that renders the game, etc. With this code, the "switching tabs" problem is fixed for me on both Windows and OS X. I haven't tested on Fedora yet; when I do I'll post back with the results.
    So try the above if you can, and post back with whether it works for you! I suppose if gamePanel is not a java.awt.Container subclass (i.e. if you use java.awt.Canvas), you won't have a setFocusCycleRoot() method to call, but you might not need it in that case. Not sure, haven't tested that either...

  • Problem with requesting focus for a list

    Hi there !
    What would be the right way to request focus for a list component ?
    I can use select() method to select some item from a list, but the list itself still hasn't got a focus until I click it.
    What I'd like to do is to be able to highlight some item from the list by using up and down arrow keys only, without clicking the list first =)

    The list is visible, but still this doesn't work.
    I think that the reason for this may be that I'm running this app on Nokia 9210 Communicator emulator. The emulator itself has had some not-so-minor problems...

  • Problem in setting focus in JTable

    Hi,
    In my application I am using JTable with a customized table model. The table has two columns. First column has jcombobox as its editor and the second column has the customized editor developed by me. This particular table appears in a wizard. When this wizard page (which contains the above JTable) is shown I set the keyboard focus on the JTable using JTable's requestFocus() method (I even tried with grabFocus()method but got the same result). But the focus does not appear on the JTable. Even none of the cells get the focus. Also no matter how many time I press tab key the focus does not shift to the next component in the page which happens to be a JButton. I have set the next focussable element for the JTable as that JButton. When I manually put the focus on one of the cells by clicking on it and then if I press either arrow key or tab key the focus is lost and it does not go either on the next cell or the JButton.
    If anybody can shed some light on what exactly needs to be done to give proper keyboard navigation for JTable please let me know.
    Regards
    Atul

    Hi Atul,
    I suspect your problem is with your cell renderer. The DefaultTableCellRenderer class has code in the getTableCellRendererComponent method that provides the visual indication as to which cell has the focus. You will want to do something similar in your JPanel-subclassed renderer - perhaps change the border or the background color to indicate whether a cell is selected or not.
    Note also that there is a difference between a cell that has "isSelected" set to true, which indicates that the cell is part of the current selection, and a cell that has "hasFocus" set to true, which indicates that the cell is the last one to be clicked on. Actually, it seems to be a bit more complicated than that, but that's at least part of what "hasFocus" indicates. A cell can be selected and not have the focus, and a cell can have the focus but not be selected. You may want to setup your renderer to clearly indicate which of these states are set and then run your app and play with the table selection to get a feel for how it works.
    Hope that helps.
    - Tyler

  • Problem in Setting Focus, on a dynamically generated field

    Hi all,
    I am having a jsp page, in which I have dynamically generated n number of input text fields, and with the function onchange="chk();", and i am passing the current text field value, and 2 more parameters min and max.
    In function chk(), i am validating the input value by condition it should be within min and max..
    my problem is i want to[b] get back the focus to the input text box, where the input is entered and not satisfied my condtion
    function chk(a,b,c)  / /a is my i/p, b and c are min and max values
    if( (parseInt(a)>=parseInt(b)) && (parseInt(a)<=parseInt(c)) )
    document.form1.submit;
    return true
    else
    alert("Invalid Output");
    var element=event.srcElement.name;
    alert(element); // I am able to get the name of input text box
    alert(event.srcElement.tagName);  // this gives INPUT
    if(event.srcElement.tagName=='INPUT')
    alert("yes"); // i can get this alert
    event.srcElement.focus();  // the focus can't be set back to that input field or element
    return false
    }

    try this and say me if it works fine!!!
    <html>
    <head>
    <script>
    function fileds() {
         var myParent = document.getElementById('myDiv');
         var text = document.createElement('input');
         text.setAttribute('id', 'myText');
         myParent.appendChild(text);
         document.all.myText.focus();
    </script>
    </head>
    <body>
    <input type="button" onClick="javascript:fileds()" value="Create And Give Focus">
    <br>
    <div id="myDiv"></div>
    </body>
    </html>
    bye

  • Problem with showing focus points in 3.5.1 & 10.9

    I cannot always display the focus points either by using Option + F or View > Show Focus Points on my MBP, late 2012.
    Prior to 3.5.1 & 10.9, either one of these commands would always display or remove, the focus points.
    At times I can restore the focus point display by either closing and opening Aperture or by rebooting OS X.  Today, nothing restores this function.
    Anyone else with this problem or hopefully know of a solution?
    Thanks,  Bill
    FWIW Apple, where is Aperture 4??

    Clem
    There is some data in Console.ap, the latest being about 45 minutes ago.  With a filter set for APERTURE there are several references to :
    "12/3/13 2:53:02.038  Aperture[1324]: The function `CGContextClear' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance."
    and a 13 inch screen full of generally single items.  I do not know how to read / use this info.
    After your message, I went to Aperture and used Option + F, View > Show Focus Points and moused over the small icon representing focal points in the upper right hand corner of the inspector with the info tab selected (just under the JPEG icon) several times but that did not generate any new data in Console.ap.
    Hope this is what you were refering to.
    Bill

  • Problem giving the focus to an element

    Hi,
    I have a complex page, with lots of refresh, execute, method which change the selected row of my table from java...
    And i want, when a row of my table is selected, to automatically give the focus to the 2nd column of the selected row.
    For this in my java code, i get the id of the good column of the selected row and call this javascript function:
    function setFocusId(id) {
        var t = document.getElementById(id);
        t.focus();
    }The java code:
            ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
            service.addScript(facesContext, "setFocusId('" + inputId + "');");That works when i click on a line of my table !
    But sometimes i change the selected line from the java code, and i have to refresh my table. To refresh the table i use :
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getTable());And when i refresh the table with this, and then i call my function to give the focus to the column, that do not work, the focus is not given...
    Do Someone have an idea to solve that problem ?
    Regards,
    Trigger

    Hi Frank
    I have the good ID of the component:
            RichTable table = this.getTquest();
            FacesContext facesContext = FacesContext.getCurrentInstance();
            String tableId = table.getClientId(facesContext);
            RowKeySet rks = table.getSelectedRowKeys();
            String inputId = "";
            if (rks != null && rks.size() > 0) {
                Object rowKey2 = rks.iterator().next();
                String rowId = table.getClientRowKeyManager().getClientRowKey(facesContext, table, rowKey2);
                inputId = tableId + ":" + rowId + ":" + "otOvprCode::content";
            } else {
                System.out.println("Error");
            ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
            service.addScript(facesContext, "setFocusId('" + inputId + "');");It works, the id is always good, but the focus is not given when i refresh the table before ...
    Julien
    Edited by: Trigger on 3 août 2011 13:13

  • Panel problem: Lost keyboard focus in Photoshop on Mac OSX

    Some background: I making a plugin that consists of some photoshop scripts and a panel created in Adobe Configurator. Basically the panel has some buttons which executes some functions in the script. The plugin is described in greater detail and can be downloaded here http://lumens.se/tychpanel
    The problem: To reproduce the problem, do the following:
    Give the panel focus by clicking somewhere on it.
    Switch to another application, then back to Photoshop. Keyboard focus is lost.
    Any ideas why this happens, and what to do about it?
    Note: this is somewhat of a cross-post started at http://www.ps-scripts.com/bb/viewtopic.php?f=2&t=4021&sid=d3c3d77dd128984f8ee30252f0f4cf2a however, as I think it's more of a Configurator / Panel issue rather than a scripting issue I'm now asking here as well.

    many and different problems around photoshop keyboard,
    also when a panel is not involved, as you can see here
    http://forums.adobe.com/message/3437082
    Have you updated to the latest osx version?
    if not try 10.6.7 that could  solve some problem  with the  keyboard
    http://blogs.adobe.com/jnack/2011/03/mac-10-6-7-fixes-photoshop-cs5-conflicts.html
    other suggestions could be :
    - duplicate the default photoshop keyboard and create a new workspace
    or
    - try  creating a new user account and  test there

  • Problem: Flex and focus() from Javascript

    Hello,
    Here is my problem.
    I have 2 html pages.
    2nd - Flexwindow.html
    opener.html contains a javascript which is similar to this:
    var window2 = window.open("Flexwindow.html", "MyWindow");
    function focuswin()
       window2.setBrowserFocus();
    focuswin() function called by pressing a button.
    Flexwindow.html contains a flex swf and a java script:
    function setBrowserFocus(){ 
      document.getElementById("MyflexObject").focus();   
    So basicaly when im starting Opener.Html it will automaticaly run my flexwindow.html in front of Opener.html (opener will be under the flex page) (and this working perfectly).
    The problem that if i will bring opener.html in front by clicking on it, and then will click the button with focuswin(), it will bring back in front my flexwindow.html (thats what i actualy needed) but it WILL AUTOMATICALY REFRESH SWF to it initial state (and thats what i dont need).
    How i can stop refreshing this swf caused by javas focus() function?
    Thank You

    I've also tried this:
    a) changed "name=" to "id=" in the applet tag
    b) var theApplet = document.getElementById("html2xml");
    var pagexml = theApplet.getXml(pagehtml);but I still get the same error.
    Is my java code correct? Any ideas?
    TIA

  • Problem with window focus in xmonad

    Hi!
    I have the following problem with xmonad:
    Suppose I do the following:
    1) go to fullscreen view
    2) Start an application app1 e.g. evince
    3) start another application on the same workspace app2 e.g. okular
    4) open in app2 a dialogue (e.g. a "file open" dialogue)
    5) press mod + tab until app1 is in the background of the dialogue
    (which is floated)
    6) click on the dialogue-window.
    Now the "background window" changes from app1 to app2. Is there a way
    to disable such a behaviour?
    Thanks
    michael
    Last edited by cm100 (2010-06-12 07:01:38)

    Hi
    It's not necessary to use fm WRITE_FORM, if the data to be written are placed in a window but not assigned to a text element, they will be written automatically.
    So try to check if the data are in text element in your sapscript
    Max

  • Problem with gaining focus for JTextField in JTabPane

    I have 2 tabs. The first one has a "save to file" puush button, the seccond has two textfields. When I push the save button I get a warning that not all fields in the seccond tab are filled. If I choose the first button it shows me the seccond tab and searches for the first empty field. Then it should set the focus to that field but it doesn't. Here's the code:
    void goToEmptyField() {
            tabs.setSelectedIndex(1);
            JTextField field =  (nameField.getText().length() == 0) ? nameField : actionField;
            field.requestFocusInWindow();
        }The code for determining the first empty field works fine. I'm not sure if the seccond tab gets focus or just shows up. It doesn't have the light rectangle at the tab's description. Could anybody help me please?

    seems to work OK in this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      JTabbedPane tabs;
      JTextField nameField = new JTextField(20);
      JTextField actionField = new JTextField(20);
      public Testing()
        setLocation(400,300);
        setSize(300,200);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel jp1 = new JPanel();
        JButton saveBtn = new JButton("Save");
        saveBtn.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            if(checkFields()) saveData();}});
        jp1.add(saveBtn);
        JPanel jp2 = new JPanel();
        jp2.add(new JLabel("Name: "));
        jp2.add(nameField);
        jp2.add(new JLabel("Action: "));
        jp2.add(actionField);
        tabs = new JTabbedPane();
        tabs.addTab("Tab 1",jp1);
        tabs.addTab("Tab 2",jp2);
        getContentPane().add(tabs);
      public boolean checkFields()
        if(nameField.getText().equals("") || actionField.getText().equals(""))
          JOptionPane.showMessageDialog(this,"field/s empty");
          goToEmptyField();
          return false;
        return true;
      public void goToEmptyField()
        tabs.setSelectedIndex(1);
        JTextField field =  (nameField.getText().length() == 0) ? nameField : actionField;
        field.requestFocusInWindow();
      public void saveData()
        JOptionPane.showMessageDialog(this,"Saving data...");
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • Problem to set focus to the particular cell in matrix

    Hi All
    I want to set the focus on the particular set on the matrix. i used following code
       oMatrix.Columns.Item("MinSal").Cells.Item(iRow).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    but it execute two times and doesnt work Properly.
    Thanks
    Rupinder

    Hi
    If (pVal.ColUID = "MinSal") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS) Then
                                                                                If MinSalaryRange(pVal.Row) = False Then
                                        BubbleEvent = False
                                                                                    End If
    and MINSalaryRange is a function
    Private Function MinSalaryRange(ByVal iRow As Integer) As Boolean
            Dim oMatrix As SAPbouiCOM.Matrix = oForm.Items.Item("SalGrade").Specific
            Dim MinSal, MinSal1, MaxSal As Integer
            Try
                If iRow > 1 Then
                    For i As Integer = 1 To iRow - 1
                        If oMatrix.Columns.Item("Date").Cells.Item(iRow).Specific.String = oMatrix.Columns.Item("Date").Cells.Item(i).Specific.String Then
                            MinSal = oMatrix.Columns.Item("MinSal").Cells.Item(iRow).Specific.String
                            MinSal1 = oMatrix.Columns.Item("MinSal").Cells.Item(i).Specific.String
                            MaxSal = oMatrix.Columns.Item("MaxSal").Cells.Item(i).Specific.String
                            If (MinSal >= MinSal1) And (MinSal <= MaxSal) Then
                                SBO_Application.MessageBox("Min Salary ")
                                'oMatrix.Columns.Item("MinSal").Cells.Item(iRow).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                              '  oMatrix.Columns.Item("MinSal").Cells.Item(iRow).Click()
                                MinSalaryRange = False
                            End If
                        End If
                    Next
                Else
                    MinSalaryRange = True
                End If
            Catch ex As Exception
                SBO_Application.MessageBox(ex.Message)
                MinSalaryRange = False
            End Try
        End Function
    Thanks

  • Problem with Jcheckbox

    Hi friends;
    I need a small help. I want to change the property of a button based on the checkbox selected or deselected value.
    My problem is :
    if checkbox is selected then disable the button else
    if checkbox is deselected then enable the button.
    if(createLoginCKB.setEnabled(true)
    button1.setEnabled(false)
    else
    button1.setEnabled(true)
    But i am getting an error in the first line saying cannot convert void to boolean.
    Please help
    thanks
    Ad

    Use the isSelected() method to check if your checkbox is selected:
        if( createLoginCKB.isSelected() )
        ...."How to Use Check Boxes":
    http://java.sun.com/docs/books/tutorial/uiswing/components/button.html#checkbox

Maybe you are looking for

  • How do i set up a new apple id for my wife but still share apps from my account

    i need to set up a new apple id for my wifes i phone but i dont want to loose her information ie cotacts & pics that are on her phone at the moment, up to now we have been sharing an apple id but i cant seem to i message her without her reply coming

  • "Resurrecting" trusty G4

    Hi all, I'm hoping you smart folks out there can give me some advice. I've decided to resurrect my old G4, which has been patiently waiting in its box for a new task since I got the G5 a couple years ago. It occurred to me that I can hook it up to my

  • ISight came on I wasn't using it - help!

    This is scary. I was just sitting here at the computer browsing the internet - I'd logged onto FB earlier but then was off, was looking up some articles in some online newspapers and listening to an internet radio station. Then I noticed that the iSi

  • Can not change anything relating to users

    I am running OS X Mavericks server. When I try to go into the "Users" pane to add a user, the buttons on the bottom left are completely greyed out. Also, when I try to edit an existing user, all of the fields are greyed out. I looked into my Admin us

  • My Camera Raw version is not compatible with my Nikon Camera?

    Hi, I have photoshop 5.1 and I am trying to open RAW files from my NIKON D600. When I try and do this it gives me the following message...Could not complete your request because the file appears to be from a camera model which is not supported by you