JButton clicked problem?

I have a Jbutton and on button clicked, action is performed.
Now if mouse is just clicked but moved only one pixel(means focus is still on the button) , action will not occur. It works only if the button is clicked and mouse does not move at all. I want action if the button is clicked and does not leave the button forground area until it is released.
thnx

Sounds like there is a problem in your code. Only can make wild guesses based on the lack of info. (If you post code, please spare us the pain of looking at all of it, just create a simple example).

Similar Messages

  • There is a screen clicking problem in my iPhone 5c..what should I do?

    There is a glass clicking problem in phone 5c ..I got it replaced once... But the replaced iPhone also has started the problem now...what should I do now?

    Go and get it replaced again...there is nothing else you can do

  • Samsung LED LCD's and the notorious "clicking" problems?

    Has anyone had or heard of the new LED LCD's having the well known "clicking" problem that the LCD's have had?

    A clicking problem? I have never heard nor have I ever experianced any such issue. If you could, please go into more detail.
    Please note that whatever I state in these forums is not a direct response from Best Buy or Geek Squad. My posts are just my own personal insights.

  • They fixed the right click problem, but now there is a bigger problem

    after updating, I can use my right click perfectly on Windows XP. however, my windows XP starts to restart very often-which means the "blue-sceen" comes out very often. I believe many poeple has this problem because I had already read couple of complains...Well...I hope apple can fix it soon.

    I could not right click on my macbook's Precision aluminum unibody enclosure under windows xp, and after updating the trobubleshooter, it works. However, my windows starts to restart again and again (the blue screen) and it says it is because the applemtp.sys has some problems. I read couple of others people's experiences on the Internet, and they all so it started to happen after they fix the right click problem.

  • Beginner - mouse over IE line -  and click problem

    My test swf - -
    http://www.jennyweir.com/testSite/
    How would I remove that white mouseover white line near the
    edges of the page (as seen on IE7)
    I made the swf full screen to try to get it to dissapear -
    but full screen is apparently only nearly full screen and it is
    still there
    I would like to learn how to make an swf which can live
    seamlessly in a matching html page so would appreciate knowing what
    to do. There is a setting I chose which I thought would fix it
    (show border) but it has not worked
    Also - click problem:
    in Flash, I made a fill layer into a button (100% size also
    and under the visible elements ) so that I could attach a goto url
    action (up)
    on this swf you have to click twice to go to the url
    I dont follow how this has come to be
    appreciate any pointers
    gav

    Hi Gavlong
    Did you try adding the background color parameter in the HTML
    of your page? This is different than the background in the Flash
    file. I looked at the source for your page and I didn't see it.
    Regarding your double-click problem it may be due to an
    Internet Explorer update from earlier in the year. I've read a few
    bits about how for some interactive web apps (Flash is included in
    the list of affected programs) the user needs to 'activate' the
    control by pressing SPACEBAR or ENTER. That would explain the need
    for the second click. Apparently there's a way to enable the
    control from your web page by using and external .js file but I
    haven't implemented it. Here are a couple of related
    links...hopefully they are of some help:
    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activati ng_activex.asp
    http://msdn.microsoft.com/ieupdate/
    http://www.adobe.com/devnet/activecontent/articles/devletter.html
    -WD

  • Selecting checkbox through a JButton click in JFrame

    i am trying to change the state of the check box in a JFrame through a JButton click, using the getsource() method.
    if (e.getSource()==johnButton){
    // Set the state of the checkbox to on
    checkbox.setSelected(true);
    i have also tried using isSelected().
    there is no error in the programme, how ever it doesn't work for me.

    Must be
    if(e.getSource()== JCheckbox)
    do whatever
    However, a better way if you had many checkboxs
    JCheckbox b = new JCheckbox(...);
    b.addActionListener(this);
    b.setActionCommand("MyChkBx");
    public void actionPerformed(ActionEvent e)
    String cmd = e.getActionEvent();
    if(cmd.equals("MyChkBx"))
    do whatever
    }

  • JButton.setBackground() Problem

    Hi All,
    When i apply the setBackground() Method to a JButton to set its Background, i face i Problem :
    Under Mac Os : The JButton DOSE NOT change its color,
    when i take my code to my other computer under Windows : OK, the JButton change...
    i am wondering ....
    1) Why under my Mac OS i face this problem...
    2) and Why i get two different results from a same code ??? Java is not Portable?? and independant of the OS?? or it is the swing that makes the problem???
    My code is so simple :
    MyJButton.setBackground(new Color(255,100,100));
    Thanks to any help...

    ellias2007 wrote:
    Sorry because it is the first time for me in this forum....
    thanks for any help...
    Sorry againMost of us don't like disjointed discussions or repeating effort for a problem that has already been solved elsewhere. Thanks for your reply. A link to one discussion: [http://www.java-forums.org/awt-swing/25986-jbutton-setbackground-problem.html]
    If you have cross-posts elsewhere, please post links in all of them to each other or to one central location.

  • Clicking problem

    I started to enconter weird problem with my laptop. Sometimes its kind of stopping me from clicking on the objects. I can move the mouse around but nothings happening when I try to click. The only way to go back to normal is to restart the computer.

    I seem to have a similar problem. In my case i figured out that the clicking problem is limited to a rectengular area on bottom of the screen, and switching a program to fullscreen solves the problem within this application. Also i think, in my case, the problem occurs when working on an external monitor, not on the built. (due to the fact i didnt tested much on just the primary monitor, im not 100% sure with this)
    I dont know what to do, since i cant find someone having the same issue...

  • Open a UNIX terminal (with a remote login session) on JButton click

    All,
    -- The domain of this problem blurs the line which decides if this question has to be posed on a Java swing audience or a UNIX forum. To understand this problem apart from being a Java swing person, you would also need to have a basic understanding of UNIX concepts such as gnome-terminal, xterm and rsh --
    I am creating a network monitoring GUI which has a JTable having many entries that pertains to various system information about nodes in a network. I have overridden the default cellEditor in the table with a custom TableCellEditor (camickr's archive) and have a column containing JButtons labelled with hostnames.
    Now, when a user clicks on any of these buttons, I would like to open up a terminal (xterm or /usr/bin/gnome-terminal) followed by executing some commands on this NEW terminal shell. In other words, I would like to automate this process as if the user opens a terminal and then keys in commands to rsh into the remote host by specifying the hostname (which is the label on the JButton) and finally provide the user with this state, from where on she takes control on that remote login session.
    I tried searching through various previous posts. I did find a related one:
    http://forum.java.sun.com/thread.jspa?threadID=5180094&messageID=9699614#9699614
    But I still have difficulty in getting my problem solved.
    The following statements are executed when one such button (labelled by a hostname) is clicked:
    public void actionPerformed(ActionEvent e) {
             String hostname = e.getActionCommand();
                fireEditingStopped();
                System.out.println( "probing:  " + hostname); //This appears correctly on the console
                Process p;
                   try {
                        p = Runtime.getRuntime().exec("/usr/bin/gnome-terminal");
                        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
                                    out.write("rsh -l root "+hostname); //attempting to remote login in the NEW shell (terminal)..... I guess :|
                   } catch (IOException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
    .I guess I am not having control on the new terminal. Is there any way I could control the newly spawned shell?
    Appreciate,
    Rajiv

    Alright...
    assuming gnome-terminal is in /usr/bin path,
    /usr/bin/gnome-terminal -e "<command>"
    would solve this problem

  • JButton CLICKED color

    Hello !
    I know how to change buttons colors with setBackground and setForeground, but I can't find a way to change the clicked color. It's always that basic grey.
    Another question while I'm here...: I have a similar problem with checkboxes colors : the checkmark remains the original color, so I can't see if it's on or off, as I put black as foreground color (and the checkmark is black...). The foreground color doesn't change the checkmark's color.
    Thanks for your help !
    C14

    I forget if the API for jcomponent/jbutton/jcheckbox suppots that. For the checkbox, I had to extend JCheckBox an doverride paint.
    For JButton you may want to do something like that as well:
    class MyButton extends JButton
    pulic void paintComponent(Graphics g)
    super.paintComponent(g);
    // do your code here
    Not sure if that will work, you want to call parent to paint the button, but there may be a state identifier to see if its in a clicked state.

  • AVL Double click Problem

    Dear Experts,
    I hv created an ALV report. when in double click on the record it take me to the required tcode (FB03).
    But the problem is ,it always display last record of internal table if I clicked on first record,
    Can any one suggest me something.
    Regards,
    Maverick

    Thanks for ur reply.
    I m using normal ALV. go through the following
    form display_all_item_alv.
    w_repid = sy-repid.
    perform update_catalog.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = w_repid
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
    *   I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE'
       IT_FIELDCAT                       = I_FCAT[]
       I_SAVE                             = 'X'
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = i_faglflexa_all
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    form user_command using r_ucomm like sy-ucomm
                      rs_selfield TYPE slis_selfield.
      w_gjahr = p_gjahr.
      case r_ucomm.
         when '&IC1'.
            if r_open = 'X'.
              set parameter id 'BLN' field i_faglflexa_open-belnr.
            elseif r_clear = 'X'.
              set parameter id 'BLN' field i_faglflexa_clear-belnr.
            else.
              set parameter id 'BLN' field i_faglflexa_clear-belnr.
            endif.
          set parameter id 'BUK' field p_bukrs.
          set parameter id 'GJR' field w_gjahr.   "i_faglflexa_clear-gjahr.
          call transaction 'FB03' and skip first screen.
      endcase.
    endform.                    "user_command
    Regards,
    Maverick

  • Adobe Acrobat 9 Pro - Creating PDF from explorer (Right-Click) problem

    Hello,
    I am new here. I've searched the forums here and maybe I've missed finding the solution.  We recently updated from Acrobat 6 Pro to Acrobat 9 Pro, and I can no longer get a PDF to be created in the same folder the Word, Excel or other file is located.
    In otherwords, when I use (under Windows Explorer) the right-click option and Convert to Adobe PDF, Acrobat 9 Pro keeps asking me where to save this file!  Under Acrobat 6 Pro, it would just create the file under the same folder unless I specified otherwise.
    I have tried to look under the Word 2003 Adobe PDF "Change Conversion Settings" and I do not have the box next to Prompt for Adobe PDF file name checked.
    Am I missing something? I would have assumed this simple process would have carried over from Acrobat 6 Pro. I really do not want to go through a bunch of processes just to save the PDF in the same folder. Under Acrobat 6 Pro, this was a simple task. I am not doing anything major, just converting various Word (.doc) files to PDF.
    Thanks.

    Using Windows 7, Acrobat 10.0.1, basically the same problem.
    Explorer > Right-Click > Convert to Adobe PDF
    brings up the Save As dialog and if you'll notice the path in the address bar at the top, it defaults to the last folder in which you created a PDF.
    In the Save As dialog, browse to the folder in which you want to save the PDF then click the Save button. This folder will stay in effect until you change it by browsing to a different one in the Save As dialog.
    Using Acrobat X, I tried everything I could think of to get a fast, efficient way of converting multiple files to PDF (with the same name and in the same folder as the source files) and, unfortunately, the method described above seems to be the fastest. I tried drag and drop to an Adobe PDF printer shortcut and that didn't work at all--it did nothing! In Acrobat X, File > Create > Batch Create Multiple Files will present a dialog with options for saving to the same folder and keeping the same name as the source file, although it seems like the files process slower in addition to having to click 8 times (not counting selecting the files) before the process begins.
    I fervently hope that Adobe will change Explorer > Right-Click > Convert to Adobe PDF back to automatically saving to the same folder as the source document.

  • Acrobat 9 - right click problem

    I recently encountered some problems with IE8 and removed and reinstalled it.
    I am now no longer able to right-click from within a web page and see 'convert to pdf'.
    There is a pdf on the toolbar but the right-click menu is missing what I use quite often.
    I have Acrobat 9.3
    Windows Vista Business
    IE8

    You may have to reinstall. It may also be that the fix of IE caused the macro of the PDF viewer to be locked out. Anyway, some thoughts for this day.

  • My Macbook Pro Retina, Mavericks 10.9.5 has clicking problems...?

    Hi, I think this is more a NEED-TO-FIX than anything else... but whenever Im using my mac, on safari, or chrome, or even just on the desktop, I experience trouble clicking. I click for example in safari, to minimize the tab, or to close a tab. It doesn't register, it sometimes doesn't even highlight the X when I'm hovering over the X at the tab. Also another problem... My mac has been having big problems with moving files around my desktop, and deleting folders and documents off my desktop into the trash bin. Ever since the newest update, my mac can't delete things off the desktop, except after about 20 tries... Well. thats about it! Thanks everyone very much, if you have any ideas on what to do... please tell!

    A Network-capable Printer using Wi-Fi to communicate needs to be told what Wi-Fi Network-name to join, and what is the password. The only way to do this is by using the control panel on the Printer itself.
    Once told, it can join your local Network, and once it does, it will show up in the list under Add-a-printer.

  • JButton NullPointerException problem

    Hi
    I was wondering if you guys can help me out on this one. I'm been prompted with a NullPointerException whenever I click on either of the 2 buttons.
    Thanks guys
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Alarm extends JPanel implements ActionListener{
        private JTextArea messageField;
        private JButton alarmOn, alarmOff;
        private JLabel alarmLED;
        public Alarm(){
            super.setPreferredSize(new Dimension(200,300));
            //configuring components;
            JButton alarmOn = new JButton("On");
            alarmOn.addActionListener(this);
            JButton alarmOff = new JButton("OFF");
            alarmOff.addActionListener(this);
            JLabel alarmLED = new JLabel("Alarm OFF");
            alarmLED.setOpaque(true);
            alarmLED.setBackground(Color.GREEN);
            messageField = new JTextArea(2,20);
            messageField.setEditable(false);
            messageField.setPreferredSize(new Dimension(200, 200));
            this.add(messageField, BorderLayout.PAGE_START);
            alarmOn.setPreferredSize(new Dimension(80, 20));
            this.add(alarmOn, BorderLayout.LINE_START);
            alarmOff.setPreferredSize(new Dimension(80, 20));
            this.add(alarmOff, BorderLayout.CENTER);
            alarmLED.setPreferredSize(new Dimension(65, 30));
            this.add(alarmLED, BorderLayout.LINE_END);
         public void actionPerformed(ActionEvent event){
            if(event.getSource()==this.alarmOn){
                this.alarmLED.setBackground(Color.RED);
                this.alarmLED.setText("Alarm ON");
            }else{
                this.alarmLED.setBackground(Color.GREEN);
                this.alarmLED.setText("Alarm OFF");
    }//end of class;

    I figured it out...I think i declared the button twice.
    Funny...it seems easier to spot it in this forums comparing it on BlueJ
    Will someone recommend me a better java client then BLueJ?
    Preferably user friendly kinds
    Thanks

Maybe you are looking for

  • Help! My CS3 won't open RAW files from my Canon EOS 7D..

    I have always used Photoshop CS3 - I like it and am quick with it, and I shoot RAW files on Canon EOS. I don't want to upgrade to CS5, however since upgrading my camera to a 7D, Photoshop will no longer open my RAW files. I've tried to update plug-in

  • Need to reset 5G sometimes to get audio out from iPod connector

    When I connect the 5G (and my Nano also), to one of my 3 docks, I sometimes have to do a reset to get line out audio out of the iPod connector. Anyone else see this behavior?

  • No-valid R/3 system "

    Hi, When I am tring to connect with My SRM5.0 and 4.7EE Systeme using trusted systems am facing probles. 1) "Service SAPms <SID> is unknown". for this I checked with C:/win32 ../Etc services file and my system details are maintained.--Even the am get

  • LCCS 1.1.1 is released!

    Hello Everyone, We present our latest LCCS SDK 1.1.1 release. Our primary goal for this release has been consolidating on big features we released in mid April as we move forward. We took special care about some user issues raised in last one month.

  • Opening a RAW image from RL4 Beta in PSS5.1 I get this error message!

    I can't find any reference to the ACR-7 plug-in on the Adobe Labs site. When I select the 'Render using Lightroom' option,  the rendered image looks the same as the RAW image in LR4 Beta, that's good however you lose the Smart-Object capability, no m