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


Groups > comp.lang.java.gui > #2631 > unrolled thread

Re: rotating text problem

Started by"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
First post2011-04-27 15:40 +0000
Last post2011-04-27 15:40 +0000
Articles 5 — 5 participants

Back to article view | Back to comp.lang.java.gui

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: rotating text problem "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
    Re: rotating text problem "John Burton" <john.burton@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
    Re: rotating text problem "Bruintje Beer" <bruintje.beer@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
      Re: rotating text problem "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
        Re: rotating text problem "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000

#2631 — Re: rotating text problem

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
SubjectRe: rotating text problem
Message-ID<799df3ab03038@uwe>
  To: comp.lang.java.gui
Bruintje Beer wrote:
..
>I have problem with a piece of code (see below). 

Why are you wasting your time, and our bandwith,
posting these rubbish snippets.  Not only is this 
incompilable because it is incomplete, but it is not
even the code being used.  I can infer that because..

>void paintComponent() {
>                Graphics2D g2 = (Graphics2D)g;

D:\RotatedTextPanel.java:N: cannot find symbol
symbol  : variable g
location: class RotatedTextPanel
  Graphics2D g2 = (Graphics2D)g;
                                               ^

Note also that the method you are attempting to
override there, is public.

Why not progress this by posting an SSCCE?
<http://www.physci.org/codes/sscce.html>

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200710/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#2634

From"John Burton" <john.burton@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
Message-ID<471070ea$0$509$5a6aecb4@news.aaisp.net.uk>
In reply to#2631
  To: comp.lang.java.gui
"Andrew Thompson" <u32984@uwe> wrote in message news:799df3ab03038@uwe...
> Bruintje Beer wrote:
> ..
>>I have problem with a piece of code (see below).
>
> Why are you wasting your time, and our bandwith,
> posting these rubbish snippets.  Not only is this
> incompilable because it is incomplete, but it is not
> even the code being used.  I can infer that because..

Please don't waste our time and bandwidth posting rubbish that doesn't even 
attempt to help the orignal poster.

The problems is that you're not getting a fresh Graphics object each time 
the paint is called, it an retain the transformation from the previous time. 
You need to either reset the transformations before you return on instead 
get a copy of the Graphics object using something like

Graphics2D g2Copy = (Graphics2D)g.create();

and work with that instead.
Probably best to dispose of the copy at the end of the method
g2Copy.dispose()

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2635

From"Bruintje Beer" <bruintje.beer@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
Message-ID<47107ea9$0$24419$5fc3050@news.tiscali.nl>
In reply to#2631
  To: comp.lang.java.gui

"Andrew Thompson" <u32984@uwe> schreef in bericht news:799df3ab03038@uwe...
> Bruintje Beer wrote:
> ..
>>I have problem with a piece of code (see below).
>
> Why are you wasting your time, and our bandwith,
> posting these rubbish snippets.  Not only is this
> incompilable because it is incomplete, but it is not
> even the code being used.  I can infer that because..
>
>>void paintComponent() {
>>                Graphics2D g2 = (Graphics2D)g;
>
> D:\RotatedTextPanel.java:N: cannot find symbol
> symbol  : variable g
> location: class RotatedTextPanel
>  Graphics2D g2 = (Graphics2D)g;
>                                               ^
>
> Note also that the method you are attempting to
> override there, is public.
>
> Why not progress this by posting an SSCCE?
> <http://www.physci.org/codes/sscce.html>
>
> -- 
> Andrew Thompson
> http://www.athompson.info/andrew/
>
> Message posted via JavaKB.com
> http://www.javakb.com/Uwe/Forums.aspx/java-gui/200710/1
>

I am interrested in solving my problem and do not want to put a complete 
java program here. I understand that it needs several import etc to get this 
working.

I find it very stupid if you try this piece of code and try to run. Every 
idiot understand this is not a complete java program. So stick to the 
question. In fact you did not give a solution, maybe yo not understand java. 
The poster John Burton has a good solution.

Johan

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2638

From"Roedy Green" <roedy.green@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
Message-ID<nm61h3li7m6hi2cdujt74ehd5mktiuoekl@4ax.com>
In reply to#2635
  To: comp.lang.java.gui
On Sat, 13 Oct 2007 10:15:37 +0200, "Bruintje Beer" <me@knoware.nl>
wrote, quoted or indirectly quoted someone who said :

>I find it very stupid if you try this piece of code and try to run. Every 
>idiot understand this is not a complete java program. So stick to the 
>question. In fact you did not give a solution, maybe yo not understand java. 
>The poster John Burton has a good solution.

If you post a SSCCE it makes it much easier for others to explore your
problem. You will get more responses and higher quality ones.

See http://mindprod.com/jgloss/sscce.html

Be careful about biting the hand attempting to feed you, even when
that hand is connected to a scolding mouth. You can find yourself
quickly killfiled by people other than the scolder.  

The reason is simple.  They don't want to be snapped at too if they
produce a less than perfect response for your highness.



-- 
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2640

From"Lew" <lew@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
Message-ID<XtOdncN8O-3ct4zanZ2dnUVZ_h7inZ2d@comcast.com>
In reply to#2638
  To: comp.lang.java.gui
"Bruintje Beer" wrote, quoted or indirectly quoted someone who said :
>> I find it very stupid if you try this piece of code and try to run. Every 
>> idiot understand this is not a complete java [sic] program. So stick to the 
>> question. In fact you did not give a solution, maybe yo [sic] not understand java. 
>> The poster John Burton has a good solution.

I see no reason for you to insult Andrew.  He didn't insult you.  You asked 
for our help, remember?  You might try being less rude.

-- 
Lew

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web