help on java applet

halow everbody.. new comer is here!!!!hehe..needed help frm each of u *if possible* heeh.. cos i nd to create an image slider bar control that can view each of the images one by one when i move e slider.. help help.. thank u u all
[244 byte] By [fatfatpopoa] at [2007-11-27 7:40:04]
# 1
Your keyboard appears to be complete ******, I suggest you get a new one.
cotton.ma at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 2
hmm.. wat u mean? my keyboard?
fatfatpopoa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 3

> hmm.. wat u mean? my keyboard?

Please make the extra effort to write out words such as "please" and "your" and "what" and "you" and "because". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership.

cotton.ma at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 4

> > hmm.. wat u mean? my keyboard?

>

> Please make the extra effort to write out words such

> as "please" and "your" and "what" and "you" and

> "because". The extra keystrokes won't cost much in

> the way of time, and the enhanced clarity will be

> appreciated by those communicating on a forum with

> international readership.

Hmm ... I wonder why Java forum never do the same check before allowing a new reply to be posted, like what JavaRanch is doing.

Jensona at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 5
Maybe he's using a cell phone to access the forums.
bsampieria at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 6
JSlider and a CardLayout?
bsampieria at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 7
so sorry!!!! please forgive my rudeness and for being so impolite.. i had learnt my lesson.. please kindly help mi cos im reali new to java and i need to create an image slider bar control using java applet.. please give mi ur guidance.. thank u veri muchBest Regardfrom:
fatfatpopoa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 8

so sorry for not explaining clear enough..i need to create an image slider control which the output result will b when i scroll e slider, it will move on to e next image, meaning the slider control bar will control e viewing of the next image..i need to put on to e website using java applet.. thank u for ur kind attention and precious time of eveyone..

fatfatpopoa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 9

> so sorry for not explaining clear enough..i need to

> create an image slider control which the output

> result will b when i scroll e slider, it will move on

> to e next image, meaning the slider control bar will

> control e viewing of the next image..i need to put on

> to e website using java applet.. thank u for ur kind

> attention and precious time of eveyone..

You are still using abbreviations. I don't actually know what all the letter e on the page is supposed to be. I am guessing they are meant to be the but I can't even understand how that is an abbreviation. You is spelt with 3 letters not one. Your is spelt with 4 letters not one.

Be is spelt with 2 letters not one.

Aknibbsa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 10

halow im here again.. i have tink of a better explaination of my project, that is create a horizontal slider bar, that will display a different image each weight along the slider. So, at each step of the slider - a different image is displayed..so i need to load it up to the website using java applet.. The output of the result will b just seein images being view by e slider bar.. Thank u for ur time and attention.. please please help mi..

Best Regard

From:sharon

fatfatpopoa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 11
Use a JSlider, and add a ChangeListener to it. When the stateChanged event fires, display the appropriate image on the component that displays your images. http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html
hunter9000a at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 12
the != ebe != byou != uyour != urme != mi
Aknibbsa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 13

Hello hunter9000!! I have tried on the SliderDemo, but seem that i can't get the html file needed. I went to the example index link but no html file is given so i don't really know to how get the SliderDemo done. Could u help me with it? Thank you very much. I also want to ask if the SliderDemo is for applet?

Best Regards:

Sharon

fatfatpopoa at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 14

The source files for the examples are provided in the tutorial. It's called SliderDemo.java, SliderDemo2.java, etc. You should be able to figure out the basics of using the slider from those examples.

And thanks for improving your sms lingo, your posts are a lot easier to read that way.

hunter9000a at 2007-7-12 19:20:31 > top of Java-index,Java Essentials,New To Java...
# 15

hehe..its good to know that you are comfortable with my words.. By the way i just need to copy the .java fie and the image file under the bin directory is it? Because when i loaded up to the site, it just showed mi a Cross on the top left hand corner.. Thank s alot..

Best Regard:

sharon

fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 16
I think something has to do with your image path, check your program and make sure the path pointing to the image is correct.
Jensona at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 17
thanks for your help.. but im still stuck.. can i put it in tis way, i have created a folder named "testing", under this folder i have one file which is SliderDemo.java and the rest are the 13 images of doggy. Is this the correct way of doin? Thanks alot!!!!
fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 18

> thanks for your help.. but im still stuck.. can i put

> it in tis way, i have created a folder named

> "testing", under this folder i have one file which is

> SliderDemo.java and the rest are the 13 images of

> doggy. Is this the correct way of doin? Thanks

> alot!!!!

Well, I haven't really go through the file, have you compiled it? I notice a block of code:

protected void updatePicture(int frameNum) {

//Get the image if we haven't already.

if (images[frameNumber] == null) {

images[frameNumber] = createImageIcon("images/doggy/T"

+ frameNumber

+ ".gif");

}

Is there where the images will be saved? You need to figure out the path pointing to the images, so that it will show up the images later.

Jensona at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 19
hmm..i have compiled it using MS Dos but still not working.. Can you please help mi to see whether how to get the SliderDemo2 done... Really thanks alot for your help.. i appreciate it very much..
fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 20

> hmm..i have compiled it using MS Dos but still not

> working.. Can you please help mi to see whether how

> to get the SliderDemo2 done... Really thanks alot for

> your help.. i appreciate it very much..

The straight and simplest way is to copy the whole images folder to where your SliderDemo2.java file is.

Jensona at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 21
AnyOne who can get the SliderDemo run, please kindly teach me..Thank you for all the time
fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 22

sorry.. i am still not able to get it run.. now i have created a folder named testing and inside it contain SliderDemo2.java and the image folder.. Is this correct? As for the command prompt, i went inside the testing directory and it show my SliderDemo.java and image,after that i have created the .class file also.. So how do i continue from there? Thanks alot

fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 23
An applet need to be embeded inside the HTML file.Something like this:<APPLET code="SliderDemo2.class" width="500" height="500">Java applet is loaded with the specified width and height</APPLET>
Jensona at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 24
hmm..ya i know about that, i tink the SliderDemo2 is not an applet but an application.. Can u confirm me with that because im quite confussed over here.. thank alot Jenson!!!
fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 25

> hmm..ya i know about that, i tink the SliderDemo2 is

> not an applet but an application.. Can u confirm me

> with that because im quite confussed over here..

> thank alot Jenson!!!

It is an applet and I've tested the applet would run, maybe your Internet Explorer block Java applet? It should be something to do with your system settings for security purposes, sometime it could be your firewall too, many reasons behind this.

Jensona at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 26
wow thats great..hmm..can you tell me the steps.. please!!!!! i have been stuck here for so long.. you have been a great help jenson.. Thank you very much..
fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 27

> wow thats great..hmm..can you tell me the steps..

> please!!!!! i have been stuck here for so long..

> you have been a great help jenson.. Thank you very

> much..

You can refer to this thread: http://forum.java.sun.com/thread.jspa?threadID=384170&start=15

Jensona at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 28
can i ask whether you are using command prompt to run the SliderDemo2?
fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 29

im having this error when i run it at command prompt:

C:\testing>java SliderDemo2

Exception in thread "main" java.lang.NoClassDefFoundError: SliderDemo2 (wrong na

me: components/SliderDemo2)

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$000(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

can please kindly tell mi what error is this and what i need to do to solve this error. Thank you

fatfatpopoa at 2007-7-21 22:18:46 > top of Java-index,Java Essentials,New To Java...
# 30
I'm not sure what exactly is wrong with your system. Maybe try reinstalling Java Runtime Environment would help.
Jensona at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 31
hmm.. i have just reinstall but same problem occurs.. can i know what you type at the command prompt? thanks in advance
fatfatpopoa at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 32
appletviewer yourfilename.htmlwhere yourfilename is the name of your html filemake sure your class file and html file is in the same directory
Jensona at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 33
thanks.. but where to get the html file? From the example index link, i only managed to get the SliderDemo2.java and the images.. Can tell me where to get the html file?
fatfatpopoa at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 34
you have to create your own simple html file with the basic html tags and your applet code tag inside that file
Jensona at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 35
wow really thanks alot.. So which directory did you put all the 3 files? the 3 files are .htm .java and the image folder. :)
fatfatpopoa at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 36
jenson can i ask you something... other than creating a html file myself, still need to do what changes to the .java file? thanks
fatfatpopoa at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 37
anybody know how to change the SliderDemo2 to an applet? Please guide mi.. Thanks in advance..
fatfatpopoa at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 38
anybody know how to change the SliderDemo2 to an applet? Please guide mi.. Thanks in advance..
fatfatpopoa at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...
# 39

> wow really thanks alot.. So which directory did you

> put all the 3 files? the 3 files are .htm .java and

> the image folder. :)

Yes, put the .java file and .html file together. Most importantly, remember to compile your java file, and make sure you have a class file generated.

If it still can't work. You might need to install the MS JVM, and disable support of applet with JRE and enable the MS JVM support for applet. Well, this is the only solution I can think of, in order to solve your applet problem (if you did refer to the link I put down here the other day).

Jensona at 2007-7-21 22:18:51 > top of Java-index,Java Essentials,New To Java...