Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5041

Re: How do I paint on an existing Panel?

From Knute Johnson <nospam@knutejohnson.com>
Newsgroups comp.lang.java.gui
Subject Re: How do I paint on an existing Panel?
Date 2012-02-17 17:08 -0800
Organization A noiseless patient Spider
Message-ID <jhmtmm$4m1$1@dont-email.me> (permalink)
References <4f16f997$0$2957$fa0fcedb@news.zen.co.uk> <4f3d6f9c$0$2500$da0feed9@news.zen.co.uk> <jhju7b$f12$1@dont-email.me> <4f3e977d$0$2966$fa0fcedb@news.zen.co.uk>

Show all headers | View raw


On 2/17/2012 10:07 AM, A B wrote:
> Thanks very much. I'll try that. Actually I thought I had done it in the
> JPanel, only I can't have, because I cut out the JPanel when I was
> simplifying, and here the MouseListener still is. Daft. I didn't realise
> the EventQueue stuff was necessary to the drawing routine, I think I
> thought it was for something else.

It's hard to learn to think in the language until you've seen it done 
several ways and then you've programmed it yourself over again.

I'm not sure what your program is going to do when it is finished but 
you can use the basic format that I gave to create lines or string lines 
together by following the mouse inputs.  You could add a popup menu to 
change color of the line or the style of the line as well.  The 
possibilities are unlimited once you've seen enough code to get an idea 
how to do it.

-- 

Knute Johnson

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar


Thread

How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-01-18 16:55 +0000
  Re: How do I paint on an existing Panel? Knute Johnson <nospam@knutejohnson.com> - 2012-01-18 09:29 -0800
    Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-01-18 18:12 +0000
      Re: How do I paint on an existing Panel? Knute Johnson <nospam@knutejohnson.com> - 2012-01-18 15:00 -0800
  Re: How do I paint on an existing Panel? markspace <-@.> - 2012-01-18 10:55 -0800
  Re: How do I paint on an existing Panel? Roedy Green <see_website@mindprod.com.invalid> - 2012-01-20 19:54 -0800
  Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-01-30 17:59 +0000
  Re: How do I paint on an existing Panel? Neil Morris <neil.morris4@googlemail.com> - 2012-02-04 20:58 +0000
    Re: How do I paint on an existing Panel? Lew <lewbloch@gmail.com> - 2012-02-05 01:01 -0800
    Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-10 12:10 +0000
    Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-16 20:55 +0000
      Re: How do I paint on an existing Panel? Lew <lewbloch@gmail.com> - 2012-02-16 13:04 -0800
        Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-16 21:33 +0000
  Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-16 21:05 +0000
    Re: How do I paint on an existing Panel? Lew <lewbloch@gmail.com> - 2012-02-16 13:28 -0800
      Re: How do I paint on an existing Panel? "John B. Matthews" <nospam@nospam.invalid> - 2012-02-16 21:18 -0500
      Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-17 18:20 +0000
        Re: How do I paint on an existing Panel? Lew <lewbloch@gmail.com> - 2012-02-17 10:45 -0800
        Re: How do I paint on an existing Panel? Lew <lewbloch@gmail.com> - 2012-02-17 10:49 -0800
          Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-19 19:31 +0000
            Re: How do I paint on an existing Panel? Lew <noone@lewscanon.com> - 2012-02-19 14:41 -0800
              Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-03-04 16:51 +0000
                Re: How do I paint on an existing Panel? Jeff Higgins <jeff@invalid.invalid> - 2012-03-04 12:36 -0500
                Re: How do I paint on an existing Panel? Lew <noone@lewscanon.com> - 2012-03-04 10:47 -0800
                Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-03-14 17:39 +0000
                Re: How do I paint on an existing Panel? Lew <lewbloch@gmail.com> - 2012-03-14 11:07 -0700
                Re: How do I paint on an existing Panel? "John B. Matthews" <nospam@nospam.invalid> - 2012-03-14 23:01 -0400
                Re: How do I paint on an existing Panel? markspace <-@.> - 2012-03-15 09:30 -0700
        Re: How do I paint on an existing Panel? Knute Johnson <nospam@knutejohnson.com> - 2012-02-17 17:01 -0800
    Re: How do I paint on an existing Panel? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2012-02-16 13:59 -0800
      Re: How do I paint on an existing Panel? "A B" <@bleBaker.uk> - 2012-02-17 18:07 +0000
        Re: How do I paint on an existing Panel? Knute Johnson <nospam@knutejohnson.com> - 2012-02-17 17:04 -0800
        Re: How do I paint on an existing Panel? Knute Johnson <nospam@knutejohnson.com> - 2012-02-17 17:08 -0800

csiph-web