Java help

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hii am trying to make a graphic similar to following link in Java.. orflash playerhttp://media.pearsoncmg.com/bc/aw_young_physics_11/pt1a/Media/WorkEnergy/SpringLaunchedBowler/Main.htmlorhttp://sstl.cee.uiuc.edu/java/twostory/index.htmli have basic knowledge on Java.. but dont know flash player thatwell..please let me know its part of my class project
0
Reply hjas99 (1) 6/18/2007 7:27:03 PM

See related articles to this posting


On Mon, 18 Jun 2007 19:27:03 -0000, hjas99@gmail.com wrote, quoted or
indirectly quoted someone who said :

>i am trying to make a graphic similar to following link in Java.. or
>flash player
>
>http://media.pearsoncmg.com/bc/aw_young_physics_11/pt1a/Media/WorkEnergy/SpringLaunchedBowler/Main.html

If you do this is Java, you are tackling something fairly difficult
for a newbie.  There are no widgets that behave like that, so you have
to write or your own components or do it from the Canvas.paint or
JPanel.paintComponent level.

Here is how to proceed.  Write an applet the draws the bars and plops
the icons on top of them.  See http://mindprod.com/jgloss/canvas.html
and follow links for hints on how to proceed.

Then you need to start fielding mouse click events on your canvas. You
do some division to figure out which bar the refer to and how tall you
want the bar. then you adjust the numbers for the heights of the
various bars and call repaint. Your paint then wakes up and paints the
bars the proper lengths and exits.

You might start by writing this as an application, the flip it later
to an Applet. Don't try to debug in inside a browser. That will just
drive you nuts.  See http://mindprod.com/jgloss/japplet.html on how to
convert applets to hybrids that will also run as applications.

To get warmed up, try a static application that just draws something
rather than dynamically changing.  Learn how to draw lines, shapes,
text, images. Then deal with the complications of dynamics.
See http://mindprod.com/products.html#SCREWS for a sample app.

--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
0
Reply Roedy 6/29/2007 3:31:53 PM
comp.lang.java.programmer 51965 articles. 38 followers. Post

1 Replies
263 Views

Similar Articles

[PageSpeed] 0


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Help Help Help Help Help
please,help us . we have a seious problem, we are designing a radio controlled car that is guided by the PC, to send the data wireless between the PC and the Car and vice versa. we use 2 transmitter/reciever circuits from 2 seperate radio controlled car each running with a different frequency (27 MHz & 40 MHz)and modify the functionality of each to do the disered work. but on mounting a transmitter(40MHz) and reciever(27MHz) on the car, and attach another transmitter(27MHz) and reciever(40MHz) to the PC; we found that on sending signals from the car to the PC on the transmitter & rec...

help!help!help!help!
I am a student.I am going to make a simulation of a robot (FANUC Robot M-16iB) under the matlab\simulink environment . It is a normal 6DOF robot.I want to realize any angle and any speed (under the max speed) and any position and orientation control. As I just starting to do this new field,I have no experience about it. Can you give me some simulation demo or examples for 6DOF robot? I am very eager to get these.Please write back to me as soon as possible,thank you! Sincerely, Connie        zhanglijuan920@sohu.c...

Help Help, I am intermediate in Java...need help in follow case
There is two java classes second class is for execute ant file. First Class does the most. first create a plain class which accepts two java.io.File object in constructor as input and output and a method which performs replacement. - the replacement must take into account the file ending of the input file: + for .java, .cpp, .c and .css remove the FIRST occurrence of "/ * ... */" + for .xml, .xhtml, .html and .xsl remove the FIRST occurrence of "<!-- ... -->" has any body have an example class to do it? Thanks a lot...if you can help...I create a class but is n...

Help!! Help!! Help!!
I wish to vectorize the following code: s = tf('s'); W = logspace(-1,2,50); COMBINATION = combn(W, 2); K = cell(length(COMBINATION), 1); K0 = 1 + (1/(2*s)) + 0.5*s/(0.2*s + 1); % PID controller to be approximated as PI gapValue = zeros(length(COMBINATION), 1); for i = 1:length(COMBINATION) K{i} = (COMBINATION(i,1)*(1 + (1/(COMBINATION(i,2)*s)))); % PI controller end for i = 1:length(COMBINATION) gapValue(i,1) = gapmetric(K0, K{i}); end where K0 is the Nominal transfer function and K is a cell array including transfer functions whose gap metric from K0 are...

Help, Help, Help...
Hei! Im makin a hot INVADERS game with Java but im a newbie with language, so , question is how do i use KeyPressed () function... I hav Applet Runnable... -!Hei!- Here is my problem... public class TestinKeys extends Applet implements Runnable .... .... public void run () { while ( true ) { KeyEvent ke; if ( ke.getKeyChar() == 'a' ) g_TykkiX ++; .... .... What is Wrong, im tryin to make that Invaders game but i dont know how to read keyboard with Runnable Java code... JariTapio <JariTapio@pp.inet.fi> wrote: > publi...

Help Help Help
Hello, I am a reluctant user of the website ntsearch.com. I accidentally download a Java program called "dict" from an ebook website to my XP and now every English words that I read from my computer has got a link with your web. I found it very frustrating when I noticed all the chinese characters I read from the web now become loads of question marks. I think it has a link with the program that I accidentally downloaded from that ebook website. How can I remove the so called "dict" program and other Java Scripts from my computer? This is very urgent and please answer my ...

help help help
I need to refresh my C knowledge quickly. I will be reading code for simple industrial type controls like motor controllers, valve drivers, etc This software is pretty simple, 3000 lines max. The executable is embedded in flash on the processor chip. Actually I haven't seen it yet. I haven't looked at C or done any programming in ages. I'm looking for a simple programming suite that will run on my WinXP (NTFS) computer. Something that doesn't take really long to get up to speed with. Simple is better. I just need to practice and remember and do some simple experi...

HELP HELP HELP...
Hi everybody there. I have created a GUI in MATLAB's guide application. In the GUI I am appearing on the screen a frame from a camera by pushing a button. My problem that sometimes the application works fine, but some others something is going wrong and I get the following error message: ??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> LEDsFinal>txtGrabFrame_Callback at 164 A(width, i, Blue) = abs(fread(portCMU, 1, 'uint8'))/255; What does the error message mean? What seems to be the problem? How can I overco...

Help Help Help
Hello, I am a reluctant user of the website ntsearch.com. I accidentally download a Java program called "dict" from an ebook website to my XP and now every English words that I read from my computer has got a link with your web. I found it very frustrating when I noticed all the chinese characters I read from the web now become loads of question marks. I think it has a link with the program that I accidentally downloaded from that ebook website. How can I remove the so called "dict" program and other Java Scripts from my computer? This is very urgent and please answer my ...

Help Help Help
Hello, I am a reluctant user of the website ntsearch.com. I accidentally download a Java program called "dict" from an ebook website to my XP and now every English words that I read from my computer has got a link with your web. I found it very frustrating when I noticed all the chinese characters I read from the web now become loads of question marks. I think it has a link with the program that I accidentally downloaded from that ebook website. How can I remove the so called "dict" program and other Java Scripts from my computer? This is very urgent and please answer my ...

help help help
hi all im new to linux can anyone tell me the best place to get some help installing programs in linux or best books to read -- --------------------------------- --- -- - Posted with NewsLeecher v3.7 Final Web @ http://www.newsleecher.com/?usenet ------------------- ----- ---- -- - peteware wrote: > hi all im new to linux can anyone tell me the best place to get some > help installing programs in linux or best books to read > > > -- > --------------------------------- --- -- - > Posted with NewsLeecher v3.7 Final > Web @ http://www.newsleecher.com/?usenet > -...

help! help!! help!!!
x=[0 1 10] p=[100 80] how can I get A A=[3x(1) 2x(1) x(1) 1 0 0 0 0; 2x(1) x(1) 1 0 0 0 0 0; 3x(2) 2x(2) x(2) 1 -3x(2) -2x(2) -x(2) -1; 2x(2) x(2) 1 0 -2x(2) -x(2) -1 0; p(1)x(1) p(1) 0 0 -p(2)x(2) -p(2) 0 0; p(1) 0 0 0 -p(2) 0 0 0; 0 0 0 0 -p(2)x(3) -p(2) 0 0; 0 0 0 0 -p(3) 0 0 0; ] In article <fkus3t$11h$1@fred.mathworks.com>, Jim lei <redlightlike@mathworks.com> wrote: >x=[0 1 10] >p=[100 80] >how can I get ...

HELP HELP HELP
Hello everyone, I am a freshmen at a computer university and also new to C++ . I havent used C before either but been through PASCAL and GW-BASIC. Can someone please tell me the link to download the C++ compiler which can run on my Windows XP Professional Edition. Thanks. ByE. Yours forever in Digital Paradise uSmAn could have typed what u wanted in google. "Usman" <game_pk@hotmail.com> wrote in message news:buobgo$kaacm$1@ID-217624.news.uni-berlin.de... > Hello everyone, > I am a freshmen at a computer university and also new to C++ . I havent used > C before eit...

Help Help Help
Q1 I want to know how to show the 8 bit planes of the image?? Q2 And also find edges of image by showing both edge magnitude and direction?? ...

help! help!! help!!! me
hello if x=linspace(1,100,n); p=linspace(100,80,n-1); how can I get A A=[ x(1) 1 0 0 0 0 0 0...0 0; x(2) 1 -x(2) -1 0 0 0 0...0 0; p(1) 0 -p(2) 0 0 0 0 0...0 0; 0 0 x(3) 1 -x(3) -1 0 0...0 0; 0 0 p(2) 0 -p(3) 0 0 0...0 0; 0 0 0 0 x(4) 1 -x(4) -1...0 0; 0 0 0 0 p(3) 0 -p(4) 0...0 0; ....................................... 0 0 0 0 0 0...x(i) 1 -x(i) -1...0 0; 0 0 0 0 0 0...p(i-1) 0 -p(i-1) 0 ...0 0; ......................................... 0 0 0 0 0 0....x(n-1) 1 -x(n-1) -1; 0 0 0 0 0 0....p(n-2) 0 -p(n-1) 0; 0 0 0 0 0 0.... 0 0 p(n-1) 0; ] "Jim lei" <redlightlike@mathworks.c...

HELP! HELP! HELP
I hope someone out there can solve my mysterious problem. I have tried everything imaginable, even paid $35 to Microsoft to help me, but they were not able to figure out this problem: Here is the problem: I recently created a new database in Access 2002. I took data from an > access 97 database converted one of the tables to access 2002 and then > imported it into a new table in access 2002. but for some strange > reason, every once in a while the data changes to Japanese characters, > it only happens once in a while, but once it happens that record is > lost. i have tried...

Help, Help, Help
As you can probably gather im in need of help. I started a basic JAVA course a week ago as it seems like a very interesting subject. The problem in having is with the IDE we have been asked to use. We are using JCreator, but in order for it to work, we are required to install the Java software development kit and a class library which comes with the course book called avi with is a audio visual interface library which is supposed to make it easier for us to learn the fundimentals of JAVA without having to worry about the input/output. Anyways, I have installed the JAVA SDK from SUN website...

HELP-HELP-HELP!!!!!!!!!!
On this site par example: http://communications.siemens.com/cds/frontdoor/0,2241,nl_nl_0_27443_rArNrNrNrN,00.html u have a 3d animation, like many other sites...but if i want to see this a new window opens and i see a icon with ared cross in it. also on sites with games i see this... What is my problem? I have winXP-Pro firewall is out and sec. is on low..... twan1@home.nl (Twan) writes: > On this site par example: > http://communications.siemens.com/cds/frontdoor/0,2241,nl_nl_0_27443_rArNrNrNrN,00.html > u have a 3d animation, like many other sites...but if i want to...

help help help
Sir, Am Avinash.T.J doing my btech AMRITA ...

HELP! HELP! HELP!
We are currently running R83 v3.1m (33 user) on an old 200 Mhz Pentium with 16Mb Mem and 2.x gif HD (the actual partition is smaller) We have run this for a number of years without ANY significant problems. Last week (just as my family was in the middle of "the move from Hell") the system decides to take a major dump. A bad link of some sort in the ABS area. THEN - the systems disks have disappeared. After much screaming and gnashing of teeth I got the system running again. OH! did I mention that the previous evenings file save tape was bad? Anyhow, the bo...

HELP HELP HELP
Hi! All, I am an Interactive Media Designer and know very less about asp but the basic concept behind. I got to make an online test(Exam) in asp which has a login (frm access database) panel. Can any one direct me to a free source so that I can simply pick the project and customize it. Thnaks in Advance Raj.Design In article <1112007306.454441.207430@f14g2000cwb.googlegroups.com>, raj.design@gmail.com enlightened us with... > Hi! All, > I am an Interactive Media Designer and know very less about asp but the > basic concept behind. I got to make an online te...

Help! Help! Help!
My daughter has a Dell 2300 that is coincidentally 1 month past the warranty. It will start up and shut off within 1 minute. It doesn't matter if I boot from hard drive, floppy, go into safe mode, or go to setup screen. I don't know how to try to isolate the problem. (Mother board, power supply etc.) Any suggestions? sogs wrote: > My daughter has a Dell 2300 that is coincidentally 1 month past the > warranty. It will start up and shut off within 1 minute. It doesn't > matter if I boot from hard drive, floppy, go into safe mode, or go to > setup screen....

urgent help with the program
Hello, im studying Java, something I am very much new to. I was assigned a program - its a lengthy read, but i would appreciate your input if you have. Attached you will see code, my question is what would be a good way to develop METRO section of my program, since its giving me a lot of trouble, and im not sure what is the smartest way to approach this. Please kindly give me your comments and suggestions on how to go about it. Thank you in advance. ------ Include constructors for each class, set and get methods as needed in each subclass. Use this and super whenever possible to simplify the...

Help debugging Java code with Java 1.3.1_01 Java HotSpot Client VM (jvm.dll)
Hi everybody, I am seeking help in my attempt to configure proper debugging functionality for my classes with an application on a win32 platform that uses Java HotSpot(TM) Client VM (JRE 1.3.1_01 - jvm.dll). For those of you that may actually know this application, it is Matlab. For those not familiar, it is an executable that links jvm.dll. I have a number of Java IDEs (Sun ONE Studio, JBuilder, NetBeans) and I would appreciate help in setting up at least one of them to be able to debug my classes. Does anybody have an idea where to start? I think I have figured out a way to pass...

New to advane java help me in Java beans!
Hai! I am new to ad.java.I want to do java beans programs.I have Jdk1.6,j2eesdk 1.4,j2sdk 1.4,tomcat 6,netbeans ide 5.5. is there needany other software? And give complete details how to run beans programwith small example step viz pleas! NANY(kshore) wrote:> Hai!> I am new to ad.java.I want to do java beans programs.I have Jdk> 1.6,j2eesdk 1.4,j2sdk 1.4,tomcat 6,netbeans ide 5.5. is there need> any other software? And give complete details how to run beans program> with small example step viz pleas!> Try Sun's tutorial:http://java.sun.com/docs/books/tutorial/javab...