Results 1 to 5 of 5
  1. #1
    ilop12 is offline Member
    Join Date
    May 2010
    Posts
    10
    Rep Power
    0

    Default Help for a noobie

    Im really new to java im finishing an online course and i need to know how to get a user input for an integer i think. The idea is such. i use a switch statement with many cases and i want the integer in the switch to be chosen by the user and then the corresponding day be printed. I believe that is what is necessary for this question: "Write a Java program using switch statements to list the days of the week corresponding to their input numbers?"

    and for a seperate question, how do i write a program in html with java to count the number of mouse clicks on a button within a frame. and have a yes or no question on the screen and have it count the votes in a poll.


    and write a program that will print the position of the mouse when it is clicked within a frame. and have the mouse click event cause a change in color of the applet screen
    thanks
    Last edited by ilop12; 05-25-2010 at 11:15 PM.

  2. #2
    sonny's Avatar
    sonny is offline Senior Member
    Join Date
    Feb 2010
    Location
    North West England
    Posts
    146
    Rep Power
    0

    Default thats quite a few questions!

    First
    some where in your code you are going to read in an integer then pass the integer to the switch statement, that sounds like what your trying to do.

    what have you done so far in your code, which bit do you not understand

    try posting up your code so far using code tags. this link explains how. Java Forums - BB Code List

    and then explain where your stuck.

    EDIT: this might also help http://java.sun.com/docs/books/tutor...ts/switch.html

    Kind regards
    Sonny
    Last edited by sonny; 05-25-2010 at 11:31 PM. Reason: added links
    :p I still have my "L" plates on...... directions and explanations are far more help than blaring your Horn! :p Watching:CS106a on YouTube \Reading The Art & Science of Java by Eric S Roberts

  3. #3
    me26 is offline Member
    Join Date
    May 2010
    Posts
    8
    Rep Power
    0

    Default

    for write a program in html with java, you can learn java applet or jsp. you can implement java bean for jsp. it would be easier...

    best regard
    akbar

    Don't Give Up...

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default

    write a program in html with java
    Why do want/need to do that? How is your project designed that you need to generate html?

    An html file is simply text and java can easily write text files.

    It seems you have a bunch of ideas without any design or connections between them.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by ilop12 View Post
    and for a seperate question, how do i write a program in html with java to count the number of mouse clicks on a button within a frame. and have a yes or no question on the screen and have it count the votes in a poll.
    Did you know that, Java has various technologies to work with such as JSP, Servlet and many more. Based on your requirement have to move into. So the best way you should select one stream for the moment and study about it. When you more keen on that other stuff can be learn easily.

Similar Threads

  1. [SOLVED] Problems using if / else? Noobie! :-)
    By fullmetaljacket in forum New To Java
    Replies: 4
    Last Post: 05-23-2009, 12:43 AM
  2. [SOLVED] Noobie - Calculating Percentages
    By fullmetaljacket in forum New To Java
    Replies: 16
    Last Post: 05-22-2009, 01:10 AM
  3. [SOLVED] Noobie Help! Constructors
    By fullmetaljacket in forum New To Java
    Replies: 6
    Last Post: 05-14-2009, 02:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •