Deprecated

  • Follow


I'm a beginner trying to learn using examples.....
Javac says that show() is deorecated....
what have I to use instead of it  ?
Many thanks .



class Main extends Frame {
     Image image;
     Main(String filename) {
         super("setAnimate Example");

         image = new Animator().getImage(getToolkit().getImage(filename));

         // Set the initial frame size and show the image.
         setSize(300, 390);
         show();
     }
0
Reply none 3/31/2007 1:47:35 PM

On Sat, 31 Mar 2007 15:47:35 +0200, none <""lando\"@(none)"> wrote:

>I'm a beginner trying to learn using examples.....
>Javac says that show() is deorecated....
>what have I to use instead of it  ?
>Many thanks .
>
>
>
>class Main extends Frame {
>     Image image;
>     Main(String filename) {
>         super("setAnimate Example");
>
>         image = new Animator().getImage(getToolkit().getImage(filename));
>
>         // Set the initial frame size and show the image.
>         setSize(300, 390);
>         show();
>     }

setVisible(true);

0
Reply Liz 3/31/2007 1:59:33 PM


On Mar 31, 11:47 pm, none <""lando\"@(none)"> wrote:
> I'm a beginner trying to learn using examples.....

Try using JavaDocs, they are absolutely
indispensable* in situations like this..

> Javac says that show() is deorecated....

<http://java.sun.com/javase/6/docs/api/java/awt/
Component.html#show(boolean)>

* I regard myself as 'relatively knowledgable' or
Java classes, but have referenced the JDocs a
least 15 times today.  If you do not have them
downloaded for local browsing, I recommend doing
so - now.

Andrew T.

0
Reply Andrew 3/31/2007 1:59:38 PM

Andrew Thompson wrote:
> On Mar 31, 11:47 pm, none <""lando\"@(none)"> wrote:
>> I'm a beginner trying to learn using examples.....
> 
> Try using JavaDocs, they are absolutely
> indispensable* in situations like this..

Yes.

>> Javac says that show() is deorecated....
> 
> <http://java.sun.com/javase/6/docs/api/java/awt/
> Component.html#show(boolean)>

Actually Window.show says something slightly different. Component.show 
was deprecated in 1.1. It wasn't until 1.5 that the Window override was 
also deprecated.

Tom Hawtin
0
Reply Tom 3/31/2007 6:08:02 PM

Andrew Thompson wrote:
>>> Javac says that show() is deprecated....
>>
>> <http://java.sun.com/javase/6/docs/api/java/awt/Component.html#show(boolean)>

Tom Hawtin wrote:
> Actually Window.show says something slightly different. Component.show 
> was deprecated in 1.1. It wasn't until 1.5 that the Window override was 
> also deprecated.

So if Andrew had said that "show() is deprecated" three years ago he would 
have been premature. Since about two-and-half years ago he'd've been on safe 
ground.

-- Lew
0
Reply Lew 3/31/2007 6:21:52 PM

On Apr 1, 4:08 am, Tom Hawtin <use...@tackline.plus.com> wrote:
> Andrew Thompson wrote:
...
> >> Javac says that show() is deorecated....
>
> > <http://java.sun.com/javase/6/docs/api/java/awt/
> > Component.html#show(boolean)>
>
> Actually Window.show says something slightly different. Component.show
> was deprecated in 1.1. It wasn't until 1.5 that the Window override was
> also deprecated.

Oh, f*#k!  That is not the first time I have
been caught out by that fine distinction, either.
(trying to act magnanimous) Thanks for pointing
that out (weak grin).

Andrew T.

0
Reply Andrew 3/31/2007 6:23:12 PM

5 Replies
131 Views

(page loaded in 0.045 seconds)

Similiar Articles:













7/20/2012 2:06:50 PM


Reply: