31,001 Topics

Member Avatar for
Member Avatar for Drau1

Hello , So ive been given an assignement in my university of "fixing" XPath and get it to return the nodes in the correct order. Ive been trying to find a way around writing a very long code and breaking each expression into little peaces and putting it back together …

0
51
Member Avatar for newbieGirl

Ok, I am totally confused - probably because I've been staring at my computer for hours, but I need some guidance (not for homework, just my own personal knowlegde)... Here's the output I'm trying to achieve: 012343210 001234321 000123432 000012343 000001234 ...And I know I need to use a for …

Member Avatar for SoftEngr
0
248
Member Avatar for pavan50

Can anyone tell me the real time scenarios used in projects of using interface and abstract classes in java

Member Avatar for rotten69
0
28
Member Avatar for nandosss

Okay guys. I want to create discussion. Java people we all know of the Streamtokenizer class or as I call it "lexer" class. My questions is how helpful can this class be when we try to create a lexical analyzer? How can we manipulate it in order to tokenize our …

0
105
Member Avatar for FALL3N

hello, I made a little game that is similar to "Where's Waldo?", but it has several different people to find in each level. Anyway, each person is found by the user when he/she clicks on them. Sometimes the people are hidden in a crowd, or hidden in a bigger image. …

Member Avatar for sciwizeh
0
151
Member Avatar for Nicky1224

hi there i cant seem to figure out how to print each name and letter grade of each person once and my program displays a indexStringoutofBound execption please help solve my problem heres my codes. ackage project; import javax.swing.JOptionPane; public class DoingATest { public static void main(String[] args)throws StringIndexOutOfBoundsException { …

Member Avatar for sciwizeh
0
158
Member Avatar for sciwizeh

Hello all, been a while since I've asked a question. I'm working on a project just to practice and for fun and I've run into a snag. I'm working on a painting type program and I'm trying to get a generic Buffer class for the images so I can use …

Member Avatar for sciwizeh
0
2K
Member Avatar for millroy

hi is there any way in java programming to make a compass which shows directions if please tell me how to get the coordination of lattitude so that the needle of the compass can point to the appropriate direction with respect to these values

Member Avatar for JGorard159
0
178
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
202
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
364
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
88
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
239
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
88
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
408
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
415
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
149
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
128
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
741
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
316
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
480
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
312
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
546
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
418
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
177
Member Avatar for prasanna123
0
82
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
564
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
818

The End.