|
|
Deprecated
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: deprecated NTPDATE on client - comp.protocols.time.ntpI'm using ntpdate (with -B option) at cron interval to retrieve time from my client; someone says ntpdate is deprecated but I think time offset is usu... Compiler warnings assoc. with 'fileno' being deprecated on Windows ...ACE VERSION: 5.7.0 HOST MACHINE and OPERATING SYSTEM: Intel Core2 Duo E6550 TARGET MACHINE and OPERATING SYSTEM, if different... Solaris 10 and Xvfb - comp.unix.solarisHi, I want to run xvfb on Solaris 10, and use the built-in installation (/usr/openwin/bin/X*) Now, the old parameters seems to be deprecated. But I ... ifconfig and /etc/hostname file - comp.unix.solarisGetting logical interface addresses - comp.unix.solaris ifconfig and /etc/hostname file - comp.unix.solaris From the ifconfig man page: deprecated Marks the logical ... start X Windows after login from text mode? - comp.unix.solaris ...xinit(1) invokes the deprecated Xsun(1) X server which requires root to have run kdmconfig(1M) which I doubt was done in the OP's case. However if I'm wrong about ... Displaying a longblob as an image - comp.lang.phpYour posted code is not only insecure, but obviously from the last century. There's a lot of deprecated stuff in it and many things to optimize. Illegal seek in Unix Domain Socket - comp.unix.programmer ...I am using read-function. > > > > I discovered during compliation perror-function is deprecated, and > > should be replaced with strerror. Is it? > > > > If I am using ... Error with makeglossaries - MiKTeX 2.9 - comp.text.texHi, Z:\>makeglossaries LiteratureReview defined(%hash) is deprecated at C:\Program Files\MiKTeX 2.9\scripts \glossaries\makeglossaries line 227. ... suppress known warning message - comp.unix.shellHow to suppress only this known warning message? i.e. other warning message will still appear. # /sbin/service snmpd start > /dev/null WARNING: initlog is deprecated and ... difference between JDialog's dispose() and setVisible(false ...However > unlike show() why is dispose() not deprecated? > > Thanks, > Srikanth > Look at Window.dispose() in the docs and you will know all! Deprecation - Wikipedia, the free encyclopediaA particular term or expression may be deprecated when the term becomes obsolete, essentially superfluous and either has no meaning or serves no purpose and becomes ... Deprecated | Define Deprecated at Dictionary.comverb (used with object), dep·re·cat·ed, dep·re·cat·ing. 1. to express earnest disapproval of. 2. to urge reasons against; protest against (a scheme, purpose ... 7/20/2012 2:06:50 PM
|
|
|
|
|
|
|
|
|