102 Topics
|
|
I want in java applet if a user clicks on a rectangle another one is draw. [CODE]import javax.swing.; import java.awt.; import java.awt.event.*; public class stuff extends JApplet { public void paint(Graphics g) { super.paint(g); g.drawRect(40, 40, 200, 200); if(g.isSelected()) { g.drawRect(20, 20, 50, 50); } } }[/CODE] |
|
Hi there! I have some problem with java. I developing a multiplayer applet, there a class called userServer registry new users and logging in other users. the problem is, that I don't know how to append in a array. [CODE] user Users[]; int cnt=0; Users[cnt] = new user("emorjon2", "password"); cnt++; … |
|
i need help drawing an image in an applet for some reason it doesn't show up but there are no errors [CODE]package Game; import java.applet.*; import java.awt.event.*; import java.awt.*; import javax.swing.ImageIcon; public class AppletOne extends Applet implements Runnable, KeyListener{ int x_pos = 10; int y_pos = 100; int x_speed = … |
|
Im making an applet that moves a red ball using the WASD keys but it doesnt work for some reason help? [CODE]package Game; import java.applet.*; import java.awt.event.*; import java.awt.*; public class AppletOne extends Applet implements Runnable, KeyListener{ int x_pos = 10; int y_pos = 100; int x_speed = 3; int … |
|
Hello. I am having trouble with my menu and buttons (which are just pictures that change when you scroll over them). One of my buttons works perfectly, but when I coded the rest in the same way (at least I think so) they dont work. Sorry for the long code. … |
|
I am having some trouble on inheritance in java. I am just testing how it works. I have a file that produces a random number in a folder called number. I have a file that calls the RandomNumber code that is in the main folder. I am wondering how I … |
|
Hi, I have 2 applet problems. 1) I uploaded a new jar file to server to replace old one. When I load web page in browser for that applet (on this pc), I keep getting the old jar file getting loaded as the applet (even on different browsers on this … |
|
this is my java code that i'm experimenting with right now. trying to learn graphics. [CODE]import java.applet.*; import java.awt.*; public class game extends Applet { Image dbz; public void init() { Font newFont = new Font("TimesRoman", Font.BOLD + Font.ITALIC, 50); setFont(newFont); dbz = getImage(getCodeBase(), "dbz.jpeg"); } public void paint(Graphics g) … |
|
Hey guys, I have a problem I can't seem to figure out properly: I have to implement a mirror in a java applet. For the mirror I used a second window. what I don't know: -how to rotate the second window -how to make it mirror what's in front of … |
|
I am in a java programming class but my teacher doesn't teach anything so could someone please explain to me how to import a picture into the applet and give me an example of a simple script that just imports a picture. I have learned how to use the mouse … |
|
Uh, I don't think I'm on the right lines but is there a way to connect to the internet and send some variables to a database? |
|
Can anyone provide me with a small code to [B]retrieve[/B] value either from [B]oracle 10G XE[/B] database or [B]MySql[/B] database using Java applets....... I searchd the whole internet but none worked fine for me.. Regardds Niks |
|
So I'm making a smiley face. It' compiles just fine, and at the run time it says "process completed" but the applet doesn't pop up. I have absolutely no idea what's going on!! Here is the error message: java.lang.NoSuchMethodError: main Exception in thread "main" Process completed. Here is the beginning … |
|
Hey guys i have a real issue I want to do these 3 things from an applet: ________ 1) Load an URL into a frame inside the browser and 2) Insert data into a form which is inside a frame in the users browser, and then submit the form using … |
|
Hi guys! I need to have a PDF viewer that wont allow users to save, copy, print, email& share online.. plainly just for viewing. any suggestion is appreciated. Thanks. |
|
I am working on a java applet that sends information from the applet to a gmail using JavaMail. I downloaded the JavaMail package and using the mail.jar file it [B]does[/B] send to the email from my Eclipse workspace. However, when I ftp the files (ContactForm.java, ContactForm.class, mail.jar, and test.html) to … |
|
Whenever I try to load a java applet from an html file, with the .class and .java files in the same directory, I load the html applet file and the only thing that gets displayed is NOT the applet, but the html code.....how do I enable java applets in my … |
|
|
hello guys, Can any of you help me create a game in java?? There has to be two paddles, one at the top and the other at the bottom. The paddles have to stop the ball from getting out of the screen. The ball cannot leave the screen from the … |
Ok, I did search on this site and found nothing that really helps with my issue. I am doing assignment - JPartyPlanner - I have the applet complete, it compiles and shows in IE great, BUT when I add the image code it still compiles but I get nothing showing … |
|
I have completed my applet code and it compiles fine - when I try to open it in explorer I get my welcome message but the applet does not fully open - all I get is the little box with the red X in top left corner. Help! Here is … |
|
Ok, I'm having the hardest time writing this code for work. Any suggestions on how to get me going in the right direction on this code would be great!!! Project: I need to make uninstalled fonts available for viewing for my co-workers. Therefore, I'm to write a code that can … |
|
I was given a font finder program, but I need to resize the applet... any suggestions on where and what code is needed to fit the applet to a specific size? If not, is there a setting in eclipse that will work? [CODE] public Dimension getPreferredSize() { return new Dimension(800,800);// … |
|
Any suggestions on how to get fonts from an external drive rather than on my local drive. Here is what I use now: [CODE] GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fonts = ge.getAllFonts(); // Get the fonts for (Font f : fonts) { System.out.println(f.getFontName()); }[/CODE] |
|
Hi, I am trying to load an image into an applet, however unsuccessfully. What's wrong here? [CODE]package sess31; // Import the AWT graphics package import java.awt.*; import java.applet.*; public class myownapplet extends Applet { Image image; public void init() { // Load image //image = getImage(getDocumentBase(), "show14.gif"); } public void … |
|
I'm having problems figuring where I need to go next in this project to create an applet from this application... any suggestions where I should start (in layman's terms)? [CODE] import javax.swing.*; public class storageSP { public static void main(String[] args) { //declare variables float res; String kfilm; String sfps; … |
|
So to get practice writing applets, I tried to write one that simply draws a chessboard in a 160 x 160 window. I am pretty sure I got the code right for both the html and java files, and I have the html file in the same directory as my … |
|
Does anyone know how to use a prompt on java applet? I was to create a very simple calculator. Two prompts will appear asking for inputs. Then the sum, product, difference, and quotient will appear on java applet. |
|
Anybody know of any good tutorials for customizing the appearance of Java GUI's and applets. Specifically, I'd like to design the layout of the GUI or applet in Photoshop. Thank you for your time and help. |
|
[B]This is my code so far......[/B] [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { Font myFont = new Font ("Times Roman", Font.BOLD, 25); public void paint (Graphics g) { g.setFont (myFont); g.setColor (Color.BLUE); g.drawString ("My Name" , 20, 30); String first; first = JOptionPane.showInputDialog (null, … |
|
I want to put everything into one applet. How do I do that? Please HELP :( [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { public void paint (Graphics g) { g.drawString ("Name" , 50, 25); String first; first = JOptionPane.showInputDialog (null, "Enter first number: "); … |
The End.