473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Deprecated hide and show for Choice

Hi,

I am using Choice to provide a dropdown menu in an Applet. I create the
Choice and then need to hide it until it is needed and then show it. I use
c.hide() and c.show() where 'c' is the choice.

This works fine except that when I use javac to compile the code I get the
message that I am using a deprecated API. That is, hide() and show() for
choices (and presumably other items) is no longer used. I have tried doing a
search to find the new way of doing this but do not get any useful results.

Can someone tell me how to hide and show a choice dropdown menu using newer
code?

Thank you.

Doug van Vianen
co*****@shaw.ca
Jul 17 '05 #1
2 4671
"Doug van Vianen" <co*****@shaw.ca> wrote in message
news:Vp60c.621937$JQ1.143180@pd7tw1no...
Hi,

I am using Choice to provide a dropdown menu in an Applet. I create the
Choice and then need to hide it until it is needed and then show it. I use
c.hide() and c.show() where 'c' is the choice.

This works fine except that when I use javac to compile the code I get the
message that I am using a deprecated API. That is, hide() and show() for
choices (and presumably other items) is no longer used. I have tried doing a search to find the new way of doing this but do not get any useful results.
Can someone tell me how to hide and show a choice dropdown menu using newer code?

Thank you.

Doug van Vianen
co*****@shaw.ca

The JavaDocs are your friend:
http://java.sun.com/j2se/1.4.2/docs/api/index.html

The hide and show methods of java.awt.Component have been deprecated for a
*long* time. Who told you to use them? The proper way to set the visibility
of a component is setVisible(boolean b)
Jul 17 '05 #2
Thank you for the information and the reference.
"Ryan Stewart" <zz********@gSPAMo.com> wrote in message
news:N_********************@texas.net...
"Doug van Vianen" <co*****@shaw.ca> wrote in message
news:Vp60c.621937$JQ1.143180@pd7tw1no...
Hi,

I am using Choice to provide a dropdown menu in an Applet. I create the
Choice and then need to hide it until it is needed and then show it. I use c.hide() and c.show() where 'c' is the choice.

This works fine except that when I use javac to compile the code I get the message that I am using a deprecated API. That is, hide() and show() for
choices (and presumably other items) is no longer used. I have tried
doing a
search to find the new way of doing this but do not get any useful results.

Can someone tell me how to hide and show a choice dropdown menu using

newer
code?

Thank you.

Doug van Vianen
co*****@shaw.ca

The JavaDocs are your friend:
http://java.sun.com/j2se/1.4.2/docs/api/index.html

The hide and show methods of java.awt.Component have been deprecated for a
*long* time. Who told you to use them? The proper way to set the

visibility of a component is setVisible(boolean b)

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Steve Speirs | last post by:
Hi I'm trying to show/hide a simple piece of text and a text field on a form based on what choice is made from a drop down box. <select name="dropdown" size="1"> <option selected...
18
by: Michael Skind | last post by:
Hello, I use a simple Table : <TABLE> <TR 1> <TD></TD> </TR> <TR 2> <TD></TD> </TR>
2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
3
by: Tony | last post by:
At http://www.quirksmode.org/js/placejs.html I found a discussion on how & where to place your javascript. Toward the bottom of the page, PPK has a section titled Deprecated: Direct JavaScripts,...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
1
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. ...
2
by: dusk | last post by:
Hi, I have a page with lots of hidden divs which are revealed based on choices made at each 'layer'. So I've used naming convention which represents the order in which each div becomes...
2
by: shapper | last post by:
Hello, In a simple HTML page, index.html, I have: - 3 anchors: A, B and C; - 3 divs: dA, dB and dC; Each anchor should load, when clicked, index.html but anchor A should make dA visible and...
2
by: richard | last post by:
I'm working on a menu system where I have a 3 column table affair. On start, you see a menu list in column 1. Column2 will have some general information. Column3 is an iframe for final data input....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.