36,051 Topics

Member Avatar for
Member Avatar for spec80

Hi I have the following classes: Home.java Away.java Other.java In Home.java i have a declaration like: [CODE]private Away away; private Other other; other= new Other(AN ARRAY); away = new Away(AN ARRAY , other); //where AN ARRAY is just an array, and other [/CODE] I then have code to pass AN …

Member Avatar for verruckt24
0
94
Member Avatar for bushman_222

Hey y'all I'm making the first steps into java from VB. I'm reading a book about how java works and I'm only a few chapters in. Just so you know how 'fresh' I am, I managed to write 2 classes, one main and another one, I passed a int to …

Member Avatar for verruckt24
0
166
Member Avatar for tmoney7566

I am trying to write an applet that receives 2 inputs from a user then opens a window and displays the 2 numbers that were input, along with a message of either "the numbers are equal", or "this number is the largest". My problem--my program never returns "the numbers are …

Member Avatar for tmoney7566
0
138
Member Avatar for men

hi how to solve this eroor ____________________________________________ Class.forName("com.mysql.jdbc.Driver").newInstance(); ___________________________________________________ this is my code ------------------------------------------------------------------------------------ [code=jsp]<%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" > <HTML> <HEAD> </HEAD> <BODY bgcolor="#ffffcc"> <FORM action="p.jsp" method="get" name="f1"> <TABLE style="background-color: #ECE5B6;" WIDTH="30%" > <TR> <TH width="50%">Name</TH> <TD width="50%"><INPUT …

Member Avatar for peter_budo
0
1K
Member Avatar for petike

Hello, I have to do some java project in school and my teacher said that I have to use some API for XML-parsing. So that I have to have some source XML file. I would like to make some little game like [B]Pacman[/B] and I want that XML file to …

Member Avatar for sillyboy
0
97
Member Avatar for spec80

I have 2 classes, one of which also has a nested class: 1. Home.java (extends JApplet) 2. Away.java (extends JPanel) has nested class, private class ButtonListener implements ActionListener Now in Home.java I have a Vector ( called bankaccount) which i pass to the Constructor of Away.java ( I declared the …

Member Avatar for spec80
0
124
Member Avatar for jhonny_86

Hey everyone! I have a problem when I save using FileOutputStream, ObjectOutputStream... Well, there is no problem saving a file in my java application to specified folder e.g. "C:/folder/" (that is made with JFileChooser) but the problem is that I want to use MY self made icon (that has, lets …

Member Avatar for JamesCherrill
0
566
Member Avatar for Thamizh Bharat

Hi, I am confused over the link between RGB, YUV and awt.Image. I converted a buffer having RGBFormat data to an awt.Image. I then converted a buffer having YUVFormat data to an awt.Image. I used BufferTo Image.createImage(format) method for the conversion. (RGBFormat and YUVFormat are classes in java for RGB …

Member Avatar for JamesCherrill
0
436
Member Avatar for dusk

Being absolutely new to java,I am in doubt as to how to begin my project on a Nature-cure treatment centre. (1).I intend to create a software where multiple users can access the database(JDBC comes into scene, isn't it?) (2). Also since multiple users, the software would involve working on a …

Member Avatar for verruckt24
0
88
Member Avatar for sannidhikumar99

i am developing a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List Records. Each Record contains: Name(max 100 char), Age, Notes(No Maximum Limit) No database should be used. All data must be stored in one or two files. Listing records should …

Member Avatar for verruckt24
0
115
Member Avatar for theod1987

Hey I am trying to practice some recursive function writing for a class I am taking and I am writing this code and I pull up an error that says ".class" expected in the bold, underlined line! [CODE] import java.util.*; /* This class is one in which the program will …

Member Avatar for theod1987
0
5K
Member Avatar for onyxmethod123

I'm a freshman student in my first computer science class, and I've hit one of many walls in Java development. For a little background, we're working with BlueJ. Our assignment is to implement an ArrayList into a class that calls upon another class "Circle" to create and modify a large …

Member Avatar for stultuske
0
66
Member Avatar for postvard

Hi everyone, I'm starting to use JMF and faced the problem:) The problem is to save captured video in .avi or .mov formats.I managed to capture and play it in a player, but can't save it .On the other hand when I used processor to capture and save the video …

0
72
Member Avatar for ntredame

I am supposed to write a program that converts kilometers to miles and vice versa. We are only supposed to use JOptionPane for this assignment. I am wondering if it is possible to customize the buttons in JOptionPane and associate a formula to those buttons. For instance, I want to …

Member Avatar for stephen84s
0
135
Member Avatar for MarMcD

Hello, Can anybody please help me figure out what I am missing here? I need to to create an inventory program that holds multiple items. In addition, I also have to add the manufacturer and a 5% restock fee. The inventory also calculates the total value of the entire inventory. …

Member Avatar for sillyboy
0
124
Member Avatar for goyofoyo

so I am working on Compositions i have to use the Java interface Queue<E>, create a class named InstructorQueue that implements the Queue interface and all 5 of the operations of a Queue collection interface. You may choose any of the Java collections (choose wisely) as the underlying container. so …

Member Avatar for Ezzaral
0
69
Member Avatar for jdbarry

n this program, I am calculating the value of pi by simulating throwing darts at a dartboard. I have correctly coded the formula that calculates the values of pi, however, as seen in the code, I can't figure out how to calculate the average of the pi values that I …

Member Avatar for VernonDozier
0
277
Member Avatar for VinceAshbySmith

Hey all wonder if you can spot my mistake or point me in the correct direction. I'm new to Java applets after spending quite some time learning/using standard applications. This simple program is basically converting a standard application into an applet, but for the life of me i can't see …

Member Avatar for VinceAshbySmith
0
141
Member Avatar for nedsnurb

Hi, I have written a number guessing game in java, where the user can select the number of guesses and the range of random numbers. It will display higher and lower and correct however it will not calculate when the number of guesses has been exceeded and the appropriate message. …

Member Avatar for javaAddict
0
107
Member Avatar for localp

[code=syntax] package testone; import java.io.*; public class fileread { private String[] a = new String[100]; String x; String sh; public void read(){ try { // Open the file that is the first // command line parameter FileInputStream fstream = new FileInputStream("test.txt"); // Get the object of DataInputStream DataInputStream in = …

Member Avatar for stephen84s
0
98
Member Avatar for Jawahar prabhu

Hi friends, i want to know about the java sound API because i have a project title like in my college. My requirements are 1)get voice input from mic , and 2)process that with the already stored audio please help me..

Member Avatar for stephen84s
0
58
Member Avatar for devonte15

import javax.swing.*; import BreezySwing.*; public class PaymentDDJ extends GBFrame { //Declare variables for the window objects.// private JLabel purchasedprice; private JLabel name1; private JLabel downpayment; private JLabel interestrate; private JTextField nameField; private JTextField purchasedpriceField; private JTextField downpaymentField; private JTextField interestrateField; private JButton enter; private JTextArea balance; //Define the other instance …

Member Avatar for verruckt24
0
209
Member Avatar for k2k

hi, i am trying to read the file and parse the info to the text field of the awt gui form thing. i got the info out successfully by testing with the "system.out.pritnln(variable )" .. however, using the variable values wouldn't successfully set to the TextFeild for output. //the first …

Member Avatar for masijade
0
341
Member Avatar for hinasaeedali

Respected, There is problem in making the shopping cart.But only by using the jsp not other languages. And database is designed by using M.S.Access

Member Avatar for nishantdaniweb
0
118
Member Avatar for amarjeetsingh

connection polling in struts based application i have a application,in which, required maximum 50 users when the database connection is happened then i have the requirement of connection pooling in which i create maximum 50 obects for the database connection how can i do it

Member Avatar for verruckt24
0
68
Member Avatar for jaiprakash15

Hi. I would like to know if there is a way to change the language only inside a textboxin a JSP page. For examble i would like to press a button in keyboard and the user can insert hindi characters inside the current textbox Thanks and Regards, Jayaprakash.

0
84
Member Avatar for devonte15

This is the question? The German mathematician Gottfried Leibniz developed the folling method to approximate the value of pi: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...... Write a program that allows the user to specify the number of iterations used in this approximation and displays the …

Member Avatar for VernonDozier
0
1K
Member Avatar for olgratefuldead

Hello. I have written the code below but when I compile my program, I get Taxable Income Amount Filing Status Tax Amount ------------------------------------------------------------------------------- $50,000.00 null $0.00 I initialized my String output as null but I do not know how to initialize it otherwise. And I need my output to be …

Member Avatar for olgratefuldead
0
218
Member Avatar for sciwizeh

Hello, this is related to [URL="http://www.daniweb.com/forums/thread177461.html"]the last thread I posted[/URL], but it is also different. I found something about ImageObserver with a google search and can't find much on it, I tried doing what the site on google did, but it didn't work with the simple test I wrote. here's …

Member Avatar for sciwizeh
0
689
Member Avatar for PhiberOptik

Hey, I am writing a program and it requires me to place a file on the desktop. I know in cmd prompt you can use %USERPROFILE% to do it. Is there java equivalent? Thanks PO

Member Avatar for PhiberOptik
0
126
Member Avatar for NickMalone85

I'm trying to create a program that identifies the subject and verb of a sentence. I use almost the exact same method to determine words that are nouns and words that are verbs, but when I call this method back-to-back it wont work the second time around. For example if …

Member Avatar for Ezzaral
0
88
Member Avatar for EJD

Getting all sorts of "illegal start of expression" and "; expected" and "class expected" errors mostly pertaining to my extra methods (besides the main). Any takers? import java.util.Scanner; /** This program will calculate income tax based on a person's income. */ public class Income { public static void main(String[]args) { …

Member Avatar for EJD
0
861
Member Avatar for olgratefuldead

Ok so I'm in need of some help.In the first part of this code, I need both the 'output' and 'enter' to be returned back to the calling method but one is a String and one is an int. When I compile and run the program, I get a null …

Member Avatar for olgratefuldead
0
156
Member Avatar for prateek4u

hi i am in my last year and have to make a project on the game called carrom but i dont know how to start , can any body help me please for eg how to make software specifications ,how tom start etc..

Member Avatar for PhiberOptik
0
91
Member Avatar for britto

hi everyone..... im doing an IDE as project..... my problem is when i press .(dot) a popup list must be shown...... i have done it but from the popup list i cant select an item.... the list popsup over a text area and its like the list is not at …

0
61
Member Avatar for notuserfriendly

ok everything works good outside if i make .java of the classes with a main app but when i put them together my Postfix one has a problem. if you are confused just look at the main method thats where the probelm arises. the thing is after i convert infix …

Member Avatar for notuserfriendly
0
198
Member Avatar for vartikachandra

here i have 2 files and im getting a wrong echlon form of the matrix...please help; Linear_Equation.java: package mypack; import java.io.*; public class Linear_Equation{ public static void main(String args[])throws IOException{ int i,j; matrix mat1=new matrix(); int mtx[][]=new int[3][4]; mat1.accept(); mat1.display(); mtx=mat1.echolonform(); System.out.println("\nThe answer is:"); for(i=0;i<3;i++) { System.out.println("\n"); for(j=0;j<4;j++) System.out.print(" "+ …

Member Avatar for vartikachandra
0
909
Member Avatar for erdomester

Hi! I want to read a table from Access to Java. This is the table: [url]http://kepfeltoltes.hu/090221/heights_www.kepfeltoltes.hu_.jpg[/url] I tried to do it with HashMap, but I have a problem, and I don't even know what im doing is right, I have no practice in this, altough I've been trying to find …

Member Avatar for erdomester
1
156
Member Avatar for blossoms

Hi all. can u suggest me a way to insert values stored in a html table into oracle database using JSP code?Any help would be worthy..

Member Avatar for javaAddict
0
66
Member Avatar for l_03

[code] public String preOrder(int nodeIndex) { if(nodeIndex>nodeArray.length) { return(null); } else if(nodeArray[nodeIndex].isLeaf(nodeArray.length-1)) { return(nodeArray[nodeIndex].toString()); } else { return(nodeArray[nodeIndex].toString()+" "+preOrder(nodeArray[nodeIndex].leftChild)+" "+preOrder(nodeArray[nodeIndex].rightChild)); } [/code] I am really stack with it. I dont how to output the numbers i input. If i input: 1 2 3 4 5 6, it only outputs 1 …

Member Avatar for sillyboy
0
103
Member Avatar for cproud21

I have attached 4 classes which I have created for the following assignment, as well as a test program which tests the other four classes. The only thing that I am having a problem with is reporting the amount of the fine in the ParkingTicket class, as well as determining …

Member Avatar for javaAddict
0
254
Member Avatar for SADIYA4

hey how to make an object move in an C graphics program, eg; i have drawn a swing and i want it to move... i am beginner in C graphics program so please help me...:(

Member Avatar for csurfer
0
56
Member Avatar for jhowardsandy

Hello, I am trying to write a simple program that takes input from the fields I have created for the following UI and writes them to a command prompt. Can someone help me with the next step.... getting the input entered and writing it to the prompt? I would also …

Member Avatar for jhowardsandy
1
101
Member Avatar for vartikachandra

i am trying to accept a 3 by 4 integer matrix from the user and an unable to do so.here is my code. [code] void accept()throws IOException { int i,j; InputStreamReader instream = new InputStreamReader(System.in); BufferedReader stdin = new BufferedReader(instream); System.out.println("\nEnter the coefficients and the constants for the 3 equations …

Member Avatar for vartikachandra
0
132
Member Avatar for buug

hello, when compiling this method, i get a "missing return statement error" because there is no return statement after the while loop and before the method closes. i understand that there needs to be one there, i'm just not sure what the value should be. i have commented out the …

Member Avatar for sillyboy
0
94
Member Avatar for lucstrato

If someone could help me out here I would really appreciate it... I have to get this code running for my programming class and i keep getting same symbol error here is the code: [code] public class fourseventeen { public void main(String[] args) { int j = 0; int sum …

Member Avatar for lucstrato
0
77
Member Avatar for jo8594

Ok, here is the problem. I have to ask a group of people for donations and get the total average and so on. The only problem I have is trying to get the lowest donation from the inputted numbers. I can't seem to get the actual lowest number. It just …

Member Avatar for sillyboy
0
132
Member Avatar for ppp83

Some of the time, we have to run/execute the SQL scripts using command prompt or the sql browser, but i were to replace these actions with just a single click of button, i need to create a functionality with java whereby users can perform these actions with an interface. But …

0
54
Member Avatar for curtissumpter

Hi, Everything else in this code works properly but the keyTyped method is not working properly. I have been working on this for sometime. Any help would be appreciated. Also, any advice on getting my southPanel to appear when I start the application? It appears but only after I expand …

Member Avatar for sciwizeh
0
139
Member Avatar for sciwizeh

So, I got this idea that I could make a simple game in Java, with animated GIFs for the running animations, but I have a problem, although Java will display the animation on a JLabel when made into an Icon, but I don't know how to, and can't seem to …

Member Avatar for sciwizeh
0
453

The End.