35,618 Topics
![]() | |
I new to java's applet programming & there is a problem in my program This is my program: import javax.swing.*; import java.awt.*; import java.awt.event.*; /*<applet code=Rect height=600 width=800></applet>*/ public class Rect extends JApplet implements ActionListener { JLabel jl1,jl2,jl3,jl4; JTextField jt1,jt2,jt3,jt4; JButton jb; int x1,x2,y1,y2; public void init() { Container c=getContentPane(); … | |
I am not getting this program since i beginner to applet programming import javax.swing.*; import java.awt.*; import java.awt.event.*; /*<applet code=Login height=500 width=300></applet>*/ public class Login extends JApplet implements ActionListener { JLabel jl1,jl2,jl3,jl4,jl5; JTextField jt; JPasswordField jp1,jp2; JButton jb; public void init() { Container c=getContentPane(); c.setLayout(new FlowLayout()); jl1=new JLabel("Username : "); … | |
Hi everyone, I'm currently trying to do a bit of java programming after not looking near it for almost a year. Most of what I've been doing has been C/C++, and I was just wondering - in C++ you could have a header file with functions only in it, say … | |
Hi there im in need of a java project that takes in a memo of string letters and persons name and String letteranswers to 10 multiple choice questions and compare the memo with each students answers and disply the students name and how many letters he/she got correct without using … | |
i have a error in this program...i m tryin to write a java GUI program that converts character to corresponding integer and vice versa...tis is my code...can anyone help me solve the error???the error is : 1 error found: File: C:\Users\Kumaresen Nair\Desktop\Conversion.java [line: 58] Error: The local variable word may … | |
Write a simple SMTP server that is able to establish an SMTP connection with the client and receive the email sent. The SMTP server should reply the client with the appropriate reply code based on the following SMTP commands. Command Reply Code DATA 354 HELO 250 MAIL FROM 250 QUIT … | |
After setting the time where it should start, you enter "y".. the timer will start.. It's supposed to stop whenever you want it to by pressing "n" but I don't know how.. The only way I know how to get it to ask for "y" or "n" again is to … | |
i have encounter problem on my java file,i can't find the solution..just only one error.. here is the java file and it give me an error of error: "reached of end of file while parsing in line 137" can anyone help me please?thanks in advance.. import java.io.*; import java.util.*; public … | |
So I'm trying to make a lottery program which outputs up to 6 sets of 6 random numbers using only 2d arrays and arrays for my project. No arraylists are allowed. Here is what i have so far, but it's not running because I don't have a main file?. Someone … | |
Hi all, I'm new to java and here is my code. It runs, but the output is not what I wanted. This project allows the user to enter up to 6 lottery tickets and I have to generate random numbers 0-49. The number generate fine, but the number of tickets … | |
![]() | I just started learning java a week ago, and I'm trying to make my first program - a simple grade calculator for a class I'm in - and I can't get it to compile for the life of me. I've finally gotten it down to one error ("Comp202Grader.java:60: variable letterGrade … |
Hi guys, I was supposed to create a program that simulates a haunted house. the output was supposed to be like: Welcome to the Haunted House! You are in: Front Foyer Possible directions are: North(N), East(E), West(W), Abandon(A) Where would you like to go? s Invalid Command You are in: … | |
Hi, I was asked to create a program that converts a .csv (I converted it to a .txt format first) and I've put together a pretty basic one that reads the data in the text file and formats it into XML, then saves it as a .xml. By basic I … | |
Good day! I would like to ask on how to transfer the contents of JTable to mySQL database. I have seen a lot of codes of putting contents to JTable from database but I need to know the other way around. ^^" I do not have any idea on how … | |
| |
This is an attempt to stop the timer in this code: [Click Here](http://www.daniweb.com/software-development/java/threads/422817/how-do-i-stop-this-timer#post1805134) I just learned threads but I'm not sure if I'm using it right.. It doesn't have any erros when I compile it.. but it still doesn't stop the time. the clock starts when you enter "y" though.. … | |
i need help in converting special characters in displaying in the web page. | |
OK, hello guys. I'm trying to make an image fit a JPanel. What I mean is to set a maximum size on a image, depending on how big the JPanel is. I'm using a JSplitPane to show some images. On the lef side I'm using a JList, and on the … | |
Hi all, Now i am learning Jstl , The amin advantage of jstl is to avoid scriptlets ad avoid hard code in jsp , But still we have to code using <c:if>,<c:forEach>,<c:choose> etc , then wh ywe are using jstl , pls some one guide me. thanks in advance .. | |
WHEN I put void in this method.. it says *"void type not allowed here"* in my if statement. but when I erase the void in my method.. it says *error: invalid method declaration; return type required* in the method... what should I do? public void setStop(int day , int hour … | |
import javax.swing.JPanel; import javax.swing.ImageIcon; import java.awt.Image; import java.awt.Graphics; import java.awt.Graphics2D; class View extends JPanel { Image icon1,icon2; public View(){ ImageIcon i1=new ImageIcon(this.getClass().getResource("tile1.png"));//image I drew ImageIcon i2=new ImageIcon(this.getClass().getResource("tile2.png"));//image I downloaded icon1=i1.getImage(); icon2=i2.getImage(); } public void paint(Graphics g){ super.paint(g); Graphics2D g2=(Graphics2D)g; g2.drawImage(icon1,10,10,null);//this image is not displayed g2.drawImage(icon2,200,200,null);//this image is displayed } } … | |
Plzz can someone help me where can i found good tutorials on xmpp using java | |
Hi, I'm a new java user, working on a brute-force knights tour algorithm in linkedlist. The move function worked perfectly (for a while), I mean, the pointer could move forward, or backward if a wrong path was chosen. But all of a sudden, it returned me a stackoverflow error. i'm … | |
I am trying to sort an ArrayList of Strings using the Merge Sort algorithm. However, I am having an error where it occurs on line 67 **`result.set(i,right.get(r));`** Where I get the IndexOutOfBoundsException. I have tried printing out the index of the result, and it seems to be that I am … | |
Please i've got problems reading from a recordstore(does not return any results when it reads any index beyond d deleted index) after calling the delete method with a specified index. Can anyone help? | |
Hello guys, i have a question regarding how to change the origin of a window, particularly a JFrame. I'm essentially running a program called "Fraps" to see the frames per second of my JFrame, with this program, you can display the fps on any 4 corners of the window currently … | |
Can someone please help me "write a drawTree method for the Turtle class" I am given the following information: World w = new World(); Turtle t = newTurtle (320, 480, w); The turtle will begin at the middle of the bottom of the World, facing North. Use the drawRectangle method … | |
When I am trying to design an algorithm , I had a programming problem in Java .. I want to write M nested "for" like that: for (I[0]=1; I[0]<=N; I[0]++) for (I[1]=1; I[1]<=N; I[1]++) ... for (I[M]=1; I[M]<=N; I[M]++) { Statements; } Where M is entered by the user during … | |
I m trying to create hello world example using rmi but till not succeeded.I got error in server file "Server Error java.rmi.ConnectException: Connection refused to host: 192.168.1.5; nested exception is: So please help me out. public class Server implements Hello { public String sayHello() { return "Hello World!"; } public … | |
I have created an application which puts all the images at a user defined location in a rtf document. The code is working fine and the images are getting inserted. However, if I open the document and add some text manually and save the file, the file size increases dramatically. … |
The End.