35,618 Topics

Member Avatar for
Member Avatar for vinnitro

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(); …

Member Avatar for vinnitro
0
203
Member Avatar for vinnitro

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 : "); …

Member Avatar for vinnitro
0
5K
Member Avatar for SCass2010

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 …

Member Avatar for SCass2010
0
435
Member Avatar for Nicky1224

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 …

Member Avatar for Ezzaral
0
89
Member Avatar for kumaresen

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 …

Member Avatar for NormR1
0
240
Member Avatar for swink

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 …

Member Avatar for NormR1
0
89
Member Avatar for Johannady2

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 …

Member Avatar for JamesCherrill
0
410
Member Avatar for breakzzzz20

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 …

Member Avatar for behemothdave
0
436
Member Avatar for ippo

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 …

Member Avatar for ippo
0
152
Member Avatar for ippo

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for sammoto

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 …

Member Avatar for jalpesh_007
0
130
Member Avatar for ravsau

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: …

Member Avatar for sciwizeh
0
753
Member Avatar for WH88

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 …

Member Avatar for sciwizeh
0
318
Member Avatar for chixm8_49

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 …

Member Avatar for sciwizeh
0
483
Member Avatar for pradeepamca
Member Avatar for Johannady2

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.. …

Member Avatar for NormR1
0
324
Member Avatar for archie.herbias
Member Avatar for Arhur.C
-1
154
Member Avatar for Stjerne

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 …

Member Avatar for JamesCherrill
0
638
Member Avatar for anand01

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 ..

Member Avatar for anand01
0
123
Member Avatar for Johannady2

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 …

Member Avatar for NormR1
0
437
Member Avatar for Soubhik

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 } } …

Member Avatar for NormR1
0
184
Member Avatar for prasanna123
0
84
Member Avatar for ftrzjocelyn

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 …

Member Avatar for JamesCherrill
0
569
Member Avatar for dbsp

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 …

Member Avatar for wen_cai
0
823
Member Avatar for francis994

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?

0
110
Member Avatar for thanatos1

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 …

Member Avatar for NormR1
0
269
Member Avatar for GTech4life

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 …

Member Avatar for NormR1
-1
221
Member Avatar for vriend12345

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 …

Member Avatar for vriend12345
0
118
Member Avatar for falcon221

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 …

Member Avatar for ~s.o.s~
0
136
Member Avatar for anuj_sharma

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. …

Member Avatar for anuj_sharma
0
643

The End.