Draw with single mouse click, help me!!!!

I am using this code - as you understood from it- to paint with the mouse click.
please help me either by completing it or by telling me what to do.
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Hello extends JFrame{
     Graphics g;
     ImageIcon icon = new ImageIcon("hello.gif");
     public Hello(){
          super("Hello");
          setSize(200, 200);
          addMouseListener(
               new MouseAdapter(){
                    public void mouseClicked(MouseEvent e){
                         icon.paintIcon(Hello.this, g, e.getX(), e.getY());
                         g.fillRect(10, 40, 10, 80);
                         JOptionPane.showMessageDialog(Hello.this, e.getX() + ", " + e.getY());
                         //repaint();
     // i have tried to place this listener in the paint method, but no way out.
          setVisible(true);
     public void paint(final Graphics g){
          this.g = g;
          icon.paintIcon(this, g, 100, 50);
     public static void main(String[] args){
          new Hello();
**

You can't save a graphics object like that and then paint on it.
What you need is to use a BufferedImage, paint on that, and then paint that to the screen.
See my paintarea class. You are welcome to use + modify this class as well as take any code snippets to fit into whatever you have but please add a comment where ever you've incorporated stuff from my class
PaintArea.java
===========
* Created on Jun 15, 2005 by @author Tom Jacobs
package tjacobs.ui;
import java.awt.image.BufferedImage;
import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.SwingUtilities;
import tjacobs.MathUtils;
* PaintArea is a component that you can draw in similar to but
* much simpler than the windows paint program.
public class PaintArea extends JComponent {
     BufferedImage mImg; //= new BufferedImage();
     int mBrushSize = 1;
     private boolean mSizeChanged = false;
     private Color mColor1, mColor2;
     static class PaintIcon extends ImageIcon {
          int mSize;
          public PaintIcon(Image im, int size) {
               super(im);
               mSize = size;
     public PaintArea() {
          super();
          setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
          addComponentListener(new CListener());
          MListener ml = new MListener();
          addMouseListener(ml);
          addMouseMotionListener(ml);
          setBackground(Color.WHITE);
          setForeground(Color.BLACK);
     public void paintComponent(Graphics g) {
          if (mSizeChanged) {
               handleResize();
          //g.drawImage(mImg, mImg.getWidth(), mImg.getHeight(), null);
          g.drawImage(mImg, 0, 0, null);
          //super.paintComponent(g);
          //System.out.println("Image = " + mImg);
          //System.out.println("Size: " + mImg.getWidth() + "," + mImg.getHeight());
     public void setBackground(Color c) {
          super.setBackground(c);
          if (mImg != null) {
               Graphics g = mImg.getGraphics();
               g.setColor(c);
               g.fillRect(0, 0, mImg.getWidth(), mImg.getHeight());
               g.dispose();
     public void setColor1(Color c) {
          mColor1 = c;
     public void setColor2(Color c) {
          mColor2 = c;
     public Color getColor1() {
          return mColor1;
     public Color getColor2() {
          return mColor2;
     class ToolBar extends JToolBar {
          ToolBar() {
               final ColorButton fore = new ColorButton();
               fore.setToolTipText("Foreground Color");
               final ColorButton back = new ColorButton();
               back.setToolTipText("Background Color");
               JComboBox brushSize = new JComboBox();
               //super.createImage(1, 1).;
               FontMetrics fm = new FontMetrics(getFont()) {};
               int ht = fm.getHeight();
               int useheight = fm.getHeight() % 2 == 0 ? fm.getHeight() + 1 : fm.getHeight();
               final BufferedImage im1 = new BufferedImage(useheight, useheight, BufferedImage.TYPE_INT_RGB);
               Graphics g = im1.getGraphics();
               g.setColor(Color.WHITE);
               g.fillRect(0, 0, useheight, useheight);
               g.setColor(Color.BLACK);
               g.fillOval(useheight / 2, useheight / 2, 1, 1);
               g.dispose();
               //im1.setRGB(useheight / 2 + 1, useheight / 2 + 1, 0xFFFFFF);
               final BufferedImage im2 = new BufferedImage(useheight, useheight, BufferedImage.TYPE_INT_RGB);
               g = im2.getGraphics();
               g.setColor(Color.WHITE);
               g.fillRect(0, 0, useheight, useheight);
               g.setColor(Color.BLACK);
               g.fillOval(useheight / 2 - 1, useheight / 2 - 1, 3, 3);
               g.dispose();
//               im2.setRGB(useheight / 2 - 1, useheight / 2 - 1, 3, 3, new int[] {     0, 0xFFFFFF, 0,
//                                                            0xFFFFFF, 0xFFFFFFF, 0xFFFFFF,
//                                                            0, 0xFFFFFF, 0}, 0, 1);
               final BufferedImage im3 = new BufferedImage(useheight, useheight, BufferedImage.TYPE_INT_RGB);
               g = im3.getGraphics();
               g.setColor(Color.WHITE);
               g.fillRect(0, 0, useheight, useheight);
               g.setColor(Color.BLACK);
               g.fillOval(useheight / 2 - 2, useheight / 2 - 2, 5, 5);
               g.dispose();
//               im3.setRGB(useheight / 2 - 2, useheight / 2 - 2, 5, 5, new int[] {     0, 0, 0xFFFFFF, 0, 0, 
//                                                            0, 0xFFFFFF, 0xFFFFFFF, 0xFFFFFF, 0,
//                                                            0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF,
//                                                            0, 0xFFFFFF, 0xFFFFFFF, 0xFFFFFF, 0,
//                                                            0, 0, 0xFFFFFF, 0, 0}, 0, 1);
               //JLabel l1 = new JLabel("1 pt", new ImageIcon(im1), JLabel.LEFT);
               //JLabel l2 = new JLabel("3 pt", new ImageIcon(im2), JLabel.LEFT);
               //JLabel l3 = new JLabel("5 pt", new ImageIcon(im3), JLabel.LEFT);
               brushSize.addItem(new PaintIcon(im1, 1));
               brushSize.addItem(new PaintIcon(im2, 3));
               brushSize.addItem(new PaintIcon(im3, 5));
               //brushSize.addItem("Other");
               add(fore);
               add(back);
               add(brushSize);
               PropertyChangeListener pl = new PropertyChangeListener() {
                    public void propertyChange(PropertyChangeEvent ev) {
                         Object src = ev.getSource();
                         if (src != fore && src != back) {
                              return;
                         Color c = (Color) ev.getNewValue();
                         if (ev.getSource() == fore) {
                              mColor1 = c;
                         else {
                              mColor2 = c;
               fore.addPropertyChangeListener("Color", pl);
               back.addPropertyChangeListener("Color", pl);
               fore.changeColor(Color.BLACK);
               back.changeColor(Color.WHITE);
               brushSize.addItemListener(new ItemListener() {
                    public void itemStateChanged(ItemEvent ev) {
                         System.out.println("ItemEvent");
                         if (ev.getID() == ItemEvent.DESELECTED) {
                              return;
                         System.out.println("Selected");
                         Object o = ev.getItem();
                         mBrushSize = ((PaintIcon) o).mSize;
               //Graphics g = im1.getGraphics();
               //g.fillOval(0, 0, 1, 1);
               //BufferedImage im1 = new BufferedImage();
               //BufferedImage im1 = new BufferedImage();
     protected class MListener extends MouseAdapter implements MouseMotionListener {
          Point mLastPoint;
          public void mouseDragged(MouseEvent me) {
               Graphics g = mImg.getGraphics();
               if ((me.getModifiers() & InputEvent.BUTTON1_MASK) != 0) {
                    g.setColor(mColor1);
               } else {
                    g.setColor(mColor2);
               Point p = me.getPoint();
               if (mLastPoint == null) {
                    g.fillOval(p.x - mBrushSize / 2, p.y - mBrushSize / 2, mBrushSize, mBrushSize);
                    //g.drawLine(p.x, p.y, p.x, p.y);
               else {
                    g.drawLine(mLastPoint.x, mLastPoint.y, p.x, p.y);
                    //g.fillOval(p.x - mBrushSize / 2, p.y - mBrushSize / 2, mBrushSize, mBrushSize);
                    double angle = MathUtils.angle(mLastPoint, p);
                    if (angle < 0) {
                         angle += 2 * Math.PI;
                    double distance = MathUtils.distance(mLastPoint, p) * 1.5;
                    if (angle < Math.PI / 4 || angle > 7 * Math.PI / 4 || Math.abs(Math.PI - angle) < Math.PI / 4) {
                         for (int i = 0; i < mBrushSize / 2; i ++) {
                              g.drawLine(mLastPoint.x, mLastPoint.y + i, p.x, p.y + i);
                              g.drawLine(mLastPoint.x, mLastPoint.y - i, p.x, p.y - i);
//                              System.out.println("y");
//                              System.out.println("angle = " + angle / Math.PI * 180);
                    else {
                         for (int i = 0; i < mBrushSize / 2; i ++) {
                              g.drawLine(mLastPoint.x + i, mLastPoint.y, p.x + i, p.y);
                              g.drawLine(mLastPoint.x  - i, mLastPoint.y, p.x - i, p.y);
//                              System.out.println("x");
//                    System.out.println("new = " + PaintUtils.printPoint(p));
//                    System.out.println("last = " + PaintUtils.printPoint(mLastPoint));
                    //System.out.println("distance = " + distance);
                    //Graphics2D g2 = (Graphics2D) g;
                    //g2.translate(mLastPoint.x + mBrushSize / 2, mLastPoint.y);
                    //g2.rotate(angle);
                    //g2.fillRect(0, 0, (int) Math.ceil(distance), mBrushSize);
                    //g2.rotate(-angle);
                    //g2.translate(-mLastPoint.x + mBrushSize / 2, -mLastPoint.y);
//                    g.setColor(Color.RED);
//                    g.drawRect(p.x, p.y, 1, 1);
               mLastPoint = p;
               g.dispose();
               repaint();
          public void mouseMoved(MouseEvent me) {}
          public void mouseReleased(MouseEvent me) {
               mLastPoint = null;
     private void handleResize() {
          Dimension size = getSize();
          mSizeChanged = false;
          if (mImg == null) {
               mImg = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
               Graphics g = mImg.getGraphics();
               g.setColor(getBackground());
               g.fillRect(0, 0, mImg.getWidth(), mImg.getHeight());
               g.dispose();
          else {
               int newWidth = Math.max(mImg.getWidth(),getWidth());
               int newHeight = Math.max(mImg.getHeight(),getHeight());
               if (newHeight == mImg.getHeight() && newWidth == mImg.getWidth()) {
                    return;
               BufferedImage bi2 = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
               Graphics g = bi2.getGraphics();
               g.setColor(getBackground());
               g.fillRect(0, 0, bi2.getWidth(), bi2.getHeight());
               g.drawImage(mImg, mImg.getWidth(), mImg.getHeight(), null);
               g.dispose();
               mImg = bi2;
     public JToolBar getToolBar() {
          if (mToolBar == null) {
               mToolBar = new ToolBar();
          return mToolBar;
     private ToolBar mToolBar;
     public static void main (String args[]) {
          PaintArea pa = new PaintArea();
          JPanel parent = new JPanel();
          parent.setLayout(new BorderLayout());
          parent.add(pa, BorderLayout.CENTER);
          pa.setPreferredSize(new Dimension(150, 150));
          parent.add(pa.getToolBar(), BorderLayout.NORTH);
          WindowUtilities.visualize(parent);
     protected class CListener extends ComponentAdapter {
          public void componentResized(ComponentEvent ce) {
               mSizeChanged = true;
}

Similar Messages

  • Looking up the values in a waveform graph with a mouse click

    Hi,
    Does anyone know how to look up the values in a waveform graph with a mouse
    click but... without the cursor legend on, if i press in the waveform graph
    nothing happens, i must search my cursors and only then i can see the values
    of my signal data?! Isn't there any other way?
    Best regards,
    Thijs Boerée

    Dear Chad,
    I know of the function "bring cursor to center". I also figured out that
    when i use a property node of the cursor array of clusters, that i can see
    that some values change when i move the cursor (i can see the X and Y scale
    value change of the graph and also the values of the mouse pointer (in
    points due to screen resolution)) But in this cluster i can't set the mouse
    position. I allready made a VI where i can see the bounds of my
    waveformgraph and I have the Xscale (min and max) and the Yscale (min and
    max), with a linear fit i can translate my mouse position to X an Y scale
    values and when i click on my waveform graph the cursor go's to that
    position (property node of the cursor position), only disadvantage is that i
    only have the bounds of my plot area and not the position, i do have the
    position of my waveform graph but the plot area isn't allways in the center,
    if i could extract the position of the plot area i may find a solution to
    solve this problem.
    And to file a product question:
    I would like to see the function that with a mouse click a little menu
    appears and that there are options to for example set a marker on that data
    and when you right click on it, that there are options to remove it or to
    add comment, a 2D array could make a list of the different channels with
    it's markers (time stamps and comments).
    Best regards,
    And thank you for your help.
    Thijs Boer�e
    "Chad AE" schreef in bericht
    news:[email protected]...
    > Dear Thijs,
    >
    > Thank you for contacting National Instruments.
    >
    > To address your question, there is no direct VI, command, or property
    > node that will allow the cursor snap-to-mouse functionality.
    >
    > I notice a problem you may be occuring is trying to find where the
    > cursor is on the graph. If this is an issue, you can select Bring to
    > Center from the Formatting Ring on the Cursor Legend to move the
    > cursor to the center of the graph.
    >
    > Let me know if you have any further questions or if this does not
    > resolve your issue, as I would be happy to file a product suggestion
    > so that LabVIEW is improved in future versions.
    >
    > Thanks again and have a great day!
    >
    > Chad AE
    > Applications Engineer - National Instruments

  • Two JDialogs are getting open on single mouse click in MAC

    Hi ;
    I have a button,which opens a Jdialog on single mouse click,but if i do clicking multiple times,then multiple Jdialog are getting opened this issue is occuring in MAC only and not in windows.I have used all the methods of mouse event listener but there is no impact seen all,please give me some idea on this...

    To get better help sooner, post a SSCCE that clearly demonstrates your problem.
    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    db

  • Is there a way to access Bookmarks with 1 mouse click?

    Running XP, Firefox 4.0.1. I used to be able to open my bookmarks with one mouse click. Now I click on the icon, move the mouse down to "from internet explorer", then to the folder, and finally to the site shortcut. Is there a way to eliminate the extra steps?
    Thanks,
    Joe

    You can open the Bookmarks in the sidebar via View > Sidebar > Bookmarks (Ctrl+B)
    You can find toolbar buttons to open the bookmarks (star) and the history (clock) in the sidebar in the toolbar palette and drag them on a toolbar.<br />
    Firefox 4 has two bookmark buttons with a star in the Customize window.<br />
    One star button has a drop marker that open a Bookmark menu.<br />
    The other star button without the drop marker opens the bookmarks in the sidebar.<br />
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"<br />
    Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily.
    * http://kb.mozillazine.org/Toolbar_customization

  • Problems with mighty mouse clicking

    Hi everybody, happy New Year first of all!
    Then my problem: I bought an Intel iMac about 1 year ago, and have been using the supplied wired mighty mouse since then. I set it up with left+right top buttons.
    I didn't have a single problem until a few weeks ago.
    First, the "typycal dirty scrolling ball" which seems to be solved by rubbing the ball on a piece of papere with the mouse up side down.
    Second, and most annoying, *the click functions seems to perform worse than before*. I mean, it looks like *I need more pressure now to have the mouse click* (either left or right) on links, icons, etc.
    Result: about half of the times, clicking the mouse (using the pressure I was used to) has no effort, I need to re-click with more intensity.
    Did anybody of you experience the same problem? I cannot understand if it is kind of software problem (say, something that can be solved by some restore function) or a physical one (dirt? But the mighty mouse cannot be unassembled...).
    TIA to all,
    Giopad65

    Hello and Welcome to Apple Discussions ...
    Fist, here are the instructions to clean a Might Mouse: http://support.apple.com/kb/HT1537
    and here: http://www.macosxhints.com/article.php?story=20060210115417864&lsrc=osxh
    Second, go to System Preferences/Keyboard&Mouse/Mouse and make sure your Tracking/Scrolling and Double Clicking is set to your liking. (The System Preferences panel is located in your Applications folder)
    Carolyn
    Message was edited by: Carolyn Samit

  • Having problem with right mouse click

    When connected to a database and try to create a table using the right mouse click, only options available are a (grayed out) clear filter and help. Those options are the same when using the right mouse click on other objects. This is a clean install with the newest version available on windows XP service pack 1.

    No luck in reproducing this on SQL Developer v1.0.0.14.67, Win XP SP 2, DB 9.2.0.5.
    If my connected user has privs to create tables, I get Create Table, Apply Filter, Refresh, Clear Filter (disabled unless I have a filter) and Help.
    If my connected user doesn't have privs to create tables, I get Create Table (disabled), Apply Filter, Refresh, Clear Filter (disabled unless I have a filter) and Help.
    Even looking at the tables node under a user in the Other Users area I get Apply Filter, Refresh, Clear Filter (disabled unless I have a filter) and Help.

  • A New Thread With Each Mouse Click

    Dear Java Programmers,
    The following code gives a bouncing ball inside of a panel. With each click, I need to have a different ball added and the previous ball to keep on bouncing. This part is a larger question of multitreading. When I have an action listener for mouse clicks, and I need to have a new thread with each click, how do I do this and where do I put it?
    Thank you in advance.
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.BorderLayout;
    import java.awt.Graphics;
    import java.awt.*;
    import java.awt.Color;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    public class Multiball extends JPanel implements Runnable, MouseListener {
    Thread blueBall;
    boolean xUp, yUp;
    int x= -10, y= -10, xDx, yDy;
    public Multiball()
    xUp = false;
    yUp = false;
    xDx = 1;
    yDy = 1;
    addMouseListener( this );
    public void mousePressed( MouseEvent e )
    x = e.getX();
    y = e.getY();
    blueBall = new Thread( this );
    blueBall.start();
    public void paint( Graphics g )
    super.paint( g );
    g.setColor( Color.blue );
    g.fillOval( x, y, 10, 10 );
    public void run()
    while ( true ) {
    try {
    blueBall.sleep( 10 );
    catch ( Exception e ) {
    System.err.println( "Exception: " + e.toString() );
    if ( xUp == true )
    x += xDx;
    else
    x -= xDx;
    if ( yUp == true )
    y += yDy;
    else
    y -= yDy;
    if ( y <= 0 ) {
    yUp = true;
    yDy = ( int ) ( Math.random() * 1 + 2 );
    else if ( y >= 183 ) {
    yDy = ( int ) ( Math.random() * 1 + 2 );
    yUp = false;
    if ( x <= 0 ) {
    xUp = true;
    xDx = ( int ) ( Math.random() * 1 + 2 );
    else if ( x >= 220 ) {
    xUp = false;
    xDx = ( int ) ( Math.random() * 1 + 2 );
    repaint();
    public void mouseExited( MouseEvent e ) {}
    public void mouseClicked( MouseEvent e ) {}
    public void mouseReleased( MouseEvent e ) {}
    public void mouseEntered( MouseEvent e ) {}
    public static void main(String args[])
    JFrame a = new JFrame("Ball Bounce");
    a.add(new Multiball(), BorderLayout.CENTER);
    a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    a.setSize(240,230);
    a.setVisible(true);
    }

    Thank you very much for your replies. As for the multithreading, I have created 20 threads in the main method. With each click, one of these 20 threads starts in order. Now, how do I get a ball to paint with each one? How do I reference them in the paintComponent method?
       public void mousePressed( MouseEvent e )
             x = e.getX();
             y = e.getY();
             blueBall = new Thread( this );
             blueBall.start();
             count ++;
             System.out.print ("count is " + count);
          MyThread[] threads = new MyThread[20];
                for ( int ball = 0;ball < count; ball ++){
                threads[ball] = new MyThread ("" + ball);
                threads[ball].start ();
       }

  • Distinguishing b/t two single mouse-click and mouse-double-click

    Hi,
    I am curious to find out how Forms will distinguish between two single when-mouse-click events and a single when-mouse-doubleclick event. Is it simply a timing issue or is there more involved i.e. the 'co-ordinates' of the mouse. Thanks in advance for any opinions given,
    regards,
    Kevin.

    The difference is same as the difference of Apple and Orange.
    Its depends on O/S and event management within OS kernel.
    You can change the timing in Control panel of mouse double click.

  • Strange issue with left mouse clicking freezing other inputs on the Mac

    I'm having a strange issue with my game. I'm using Flash CS6 and a Mac.
    I've got a character that I move around the screen with keys, and you can click the left mouse button to make him throw something. The weird issue is when I click the left mouse button a lot, it seems to stop any other inputs from coming in, so for example, if I hold the right arrow key down while I'm doing a left clicking, and then let go of the right arrow key, the character will keep on moving right for a few seconds, until it finally get's the key_up event and stops.
    Even not using any mouse event handlers, so the mouse is doing nothing in the game still causes the key inputs to be delayed just by left clicking, any ideas?
    I've just tested the .swf on a PC and there was no problem, the mouse clicking was not causing any issues, so it's something peculiar to the Mac.

    Hi,
    This could be an issue if you were using Safari 5.1+ in 64bit mode. This should go away if you run Safari 5.1+ in 32 bit mode. You can change this by
    1. Go to /Applications
    2. Find Safari->RightClick->Get Info->Check 'Open in 32-bit mode' check box.
    3. Relaunch Safari 5.1 again.
    Thanks!
    Mohan

  • Record Audio in Captivate 4 for PP Slide with multiple mouse click animation

    I have a power point presentation imported into  Captivate 4.  Several of the slides have custom animation that ocurr's on mouse click. What is the best way to record the audio for these slides and have the audio sync to the right portion of the slide?

    I am afraid there is no direct way to solve your problem. You can identify the time at which the movie stops because of an on-click animation. At every location, insert a transparent caption (blank caption) and add audio to the caption.
    Thus once the movie pauses for the user to click, audio wont appear till user click on the swf. Once he does, movie timeline will move ahead and transparent caption will appear thus playing the audio file.
    Hope this helps. Do let us know if it works.
    Regards,
    Mukul

  • 2 Node RAC with Single Node Standby Help

    Hello Everyone -
    I'm preparing to set up a 2 node RAC and use a single-node standby database.
    I'm a bit confused on how to set up the Standby Redo Logs on the standby to use the LGWR functionality from the RAC instances.
    Should I just create a set of standby redo logs (alter database add standby logfile...) like on a single-instance environment or do I need to create standby logfile threads (alter database add standby logfile thread. . . ) one for each cooresponding thread on the RAC?
    It just seems odd that 2 RAC redo threads are able to write to one standby redo logfile at the same time (or maybe each RAC redo thread picks the first available standby redo log and writes to it??)
    If anyone has some advice or insight, I'd appreciate it.
    Andy

    Hello Andy,
    Did you get answer to your question about RAC with single standby?
    Could you please share with me your experience if you have done so.
    Thanks
    Amit

  • Spontaneous Exposé with Mighty Mouse clicking

    All of a sudden my PowerMac G5 will spontaneously go into F9 Exposé mode, showing all open windows, then immediately reverting back to the window I was working in. But then it will repeat this over and over and over and I'm unable to stop it. Eventually it stops on its own, but soon, while I'm attempting to go back to work on something, it starts again.
    While I'm helplessly watching this on my display, my Might Mouse (wired) clicks all by itself, not like a click I would make by pressing on it, but a small internal sounding click. I have the sides of the mouse set to Exposé—All Windows when squeezed, but don't use that function of the mouse, and since it's a pretty specific maneuver that takes a bit of pressure to engage I don't think I could have accidently triggered it, so I don't think that's the cause. I don't even have to be touching the mouse or keyboard, though, for this to happen. I use the original white extended USB keyboard that came with the G5.
    I have tried restarting the machine and that seems to correct the problem for a while, but then it eventually starts up again. It has happened with several apps and several windows open, so I thought perhaps it was some kind of memory issue, trying to do too much at one time, but it has also happened immediately upon start up with nothing opened yet.
    Has this happened to anyone else? Does this mean my mouse is failing, or my keyboard is failing, or both, or is there something else going on? Any suggestions to alleviate this permanently?
    Thanks so much for any help with this!

    I am getting the same problem with my iMac. The mouse (wired Mighty Mouse) begins making a clicking sound and the open window begin going crazy as if I were using F10 for expose'. I have been unable to figure out what triggers it, or how to stop it. The problem happens too rapidly and for too long in duration for me to believe it's because i accidentally hit the side buttons.
    What I have tried is to switch mouses, but this made no difference. I have recently set the mouse settings to turn off button 4, the side button. Don't know if this will work but worth a try. Any other ideas?
    Thanks for any help!

  • Brush Problems with Illustrator CS4... the line does not draw with my mouse movement

    When I use any other brush besides the Calligraphic Brushes from the "Artistic Ink" brush library, I press down with either my Wacom Tablet or mouse, and the line does not appear to draw. Then I release the button on the mouse or lift my pen tablet up, the lines appears. Sometimes, a little "dot dot dot" line appears when the brush stroke it going to appear. But most of the time, it's just nothing, and then the line appears after I've drawn it.
    However, with the preselected brushed at the top, and the Calligraphic Artistic Brushes, the line appears as I am drawing it. This is what I want for the other brushes.
    Is this normal?! I just recently upgraded to Windows 7, and reinstalled the Adobe Suite. I can't remember if Illustrator did this before I reinstalled it, but I'm not sure it did otherwise it would have annoyed me as much as it does now. Can anybody help me?

    Hi!
    Hope I'm not hijacking this thread.
    First time posting to a forum.
    I'm having the same problem and followed the advice for changing the file name in the Illustrator CS# Settings folder.
    This solved the problem of seeing predicted brush paths for very basic brushs, but I still can't get a preview path for any of the ink brushs.
    I've seen video tutorials which demonstrate inking techniques and the ink brush predicted path was clearly working in those tutorials.
    I'm assuming therefore that I should be able to see some type of preview when using the ink brushs.
    Any advice would be great!
    Cheers!

  • Jtable in cell how to single mouse click make the cell selected.

    it seems need double click make cell selected.
    thanks!!!

    Hi,
    these link will help you.
    It has code for both examples, with 1 click and with 2 clicks:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=362073&tstart=0&trange=15
    sergio.

  • Move a Frame with a mouse click!

    Hi. Well i have an application that have a menu bar where i can select a few frames! I want select one frame and my question is, when i click with the right button of the mouse how i can move the frame to the arrow of the mouse! I already implemented the mouse listener and the program responds correctly when i click on the right button but my problem is move the frame to the arrow.
    How can i do that?
    Thanks for your help

    dialogs in java have the "setLocation()" method to change their position

Maybe you are looking for