35,617 Topics

Member Avatar for
Member Avatar for SagarSe7en

Hey Friends, Developing an Online Shopping System. Firstly had posted a code regarding MD5 Encryption and it was solved very quickly. Require the same help again. While registering an image selected by the User should be inserted into the Database. Posting a Code which follows the DAO Pattern but i …

Member Avatar for SagarSe7en
0
1K
Member Avatar for mbarqadle

I keep getting a .class expected error in the if statement. help please. private int[] hand; private int[] play; public PokerHand(){ this.hand = new int[5]; } public boolean haveCard(int card){ if (play[] == card) return true; } public void displayCards(){ System.out.println(hand); } public void dealCards(){

Member Avatar for ~s.o.s~
0
108
Member Avatar for ObSys

Does a Java applet have to contain a "main" method or does it run from the "init()" method. I have written a small game in java following and example in a book however it does not tell you how to run the damn thing. Code has no erros from what …

Member Avatar for NormR1
0
243
Member Avatar for sobias

Hi everyone, We all face dificullity in coding recursivly, maybe most of new codders and CS students. However, **my question today is related to How many number of execution been made by the recursive method.** Which I think a bit tidious. I'll be updaing this article with new questions any …

Member Avatar for doomsday1216
0
174
Member Avatar for bhutchison

Hi, I have been asked to create a method to store information on the football players for the polish team. I have stored each player in an array of Players[]. My task is to output any players which match the search string. So the method I have to create is …

Member Avatar for NormR1
0
123
Member Avatar for kedxu

I'm probably doing this wrong, because there has to be a way to do this. Here is my current code: import javax.sound.sampled.*; public class soundHandler{ soundHandler() { } public void newSound(String sound) { new soundThread(sound).start(); } } class soundThread extends Thread { String soundName; Clip clip = null; soundThread(String i_soundName) …

Member Avatar for ~s.o.s~
0
371
Member Avatar for FUTURECompEng

I am trying to create a checker program(for a sudoku puzzle) that will read a completed board and then go to determine if it obeys the constraints. If it does, it just says so, if it doesn't it reports the conflict. Where should I start? Thanks.

Member Avatar for FUTURECompEng
0
179
Member Avatar for greystreet34

Hi, I'm working on an assignment where I have to convert military time to standard time. I think I mostly have it solved except for when the minutes are between 0 and 10. For example, 909 should read 9:09 am, but it prints 9:9 am. I'm not sure how to …

Member Avatar for greystreet34
-1
3K
Member Avatar for KRUX17

Hi, Can anyone tell me what is wrong with this code? It seems to be throwing me some error: **non-static method getName() cannot be referenced from a static context.** public void printOrders() { for(Order filename: Orders) { System.out.println("Name: " + Order.getName()); System.out.println("Quantity: " + Order.getQuantity()); } }

Member Avatar for KRUX17
0
124
Member Avatar for Checkerboz

Hi, not too sure if Web Development is the right place for this but anyway: I've never done any web development and I have never created a Firefox extension either but here's the thing: I am making a project for myself, a Java (not JavaScript!!!) program that can add, change …

Member Avatar for Checkerboz
0
320
Member Avatar for KeesA

Is it possible to remove an Icon or ImageIcon once it is set to a JButton or JLabel? When a specific action in my program has taken place, the picture in no more appropriate and I want to remove it from a JLabel.

Member Avatar for JamesCherrill
0
185
Member Avatar for IsaiahLay

**This program is supposed to read data in from a file into an array list and everything compiles correctly so far but when i go to run the applet ProcessNovels it shows a blank window saying "Start: applet not initialized? Im not sure where the problem actually is i am …

Member Avatar for NormR1
0
193
Member Avatar for KeesA

Hallo, I have a Java book from before Oracle took over Sun. In the chapter about pictures for buttons etc., the writer suggest to download a free to use icon set from java.sun.com/developer/techDocs/hi/repository Ofcourse this place does not exits anymore and the Oracle site is not clear to me where …

Member Avatar for KeesA
0
214
Member Avatar for hwoarang69

String query = "create table emails " + "(ID int, " + "To varchar(20), " + "From varchar(20), " + "Message varchar(50))"; this java statment looks right. but getting a syntax error.

Member Avatar for hwoarang69
0
84
Member Avatar for hwoarang69

i already have xammp set up on localhost. and i also added a "mysql-connector-java-5.1.22-bin" file to m exlipse under "JRE SYSTEM LIBRARY" information on xammp: user name: "root" password: "" database: "a_upload" table: "user" in eclipse iam just testing my connection. but i get a error: SQLException: No suitable driver …

Member Avatar for stultuske
0
330
Member Avatar for riahc3

This is a continuation of the last thread. I insert 3 files: Two bins (path and a number) and either a jpg or a bmp This does the following. 1: Connects to FTP and changes to C:/ (/) 2: It checks if a webfolder exists. If it is, goes to …

Member Avatar for riahc3
0
458
Member Avatar for ibthevivin

So let's take "banana", what happens when the program gets to if (ch <= 'd')? My understanding is the 'b' is < 'd' so it moves to the else. Am I wrong or right? If I'm right, then what happens at return 1 + g(s, index + 1); public class …

Member Avatar for ibthevivin
0
189
Member Avatar for cj122

import java.applet.Applet; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Image; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.util.Random; import javax.swing.JFrame; public class StartingPoint extends Applet implements Runnable, KeyListener{ public static void main(String[] args) { StartingPoint sp = new StartingPoint(); JFrame frame = new JFrame("My applet, as application"); frame.getContentPane().add(sp); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); sp.init(); sp.start(); frame.pack(); …

Member Avatar for NormR1
0
255
Member Avatar for hallepalle

Hi my name is Jakob and I'm new to programming. My project now is to make a game called Mastermind in Java Eclipse. Here is an explanation of what Mastermind is: [url]http://sv.wikipedia.org/wiki/Mastermind[/url] My game is going to be text-/number-based and it's just going to be able to run in the …

Member Avatar for NormR1
0
15K
Member Avatar for kedxu

**Background**: I have some experience in programming, but it's not a lot and not very good. I'm taking my first Java class this year, but because the pace is so slow I decided to just learn with the aid of the internet. This is how I have learned most of …

Member Avatar for kedxu
0
386
Member Avatar for sobias

Hi Guys, There's something bugging me in the past 2 days. In Doubly Linked Lists, when will a Node get comepletely deallocated? is it when both **Next** and **Previous** references points to **NULL**? forget about the class and the method **remove()** and such. Let me make an example so you …

Member Avatar for sobias
1
227
Member Avatar for lovebirds

hi , i am facing a problem with jlabel. i wanna check wether the values displayed in the label is 0 or not.but no coding seems to work. int a=Integer.parseInt(albl.getText()); if(a==0){ lbl.setText(""+"out of stock"); } else{ JDialog1.setVisible(true); }

Member Avatar for NormR1
0
36
Member Avatar for ObSys

Ok so im writing a small java application using Zellers Algorithm to work out the day of the week for a given date. I have never compiled a java program before because i'm still moderately new to the language and IDE's etc. I am using netbeans. I have tried to …

Member Avatar for NormR1
0
169
Member Avatar for FUTURECompEng

This was in the game development section and I think I accidently put it there (or an admin moved it, if so then next time can you let me know, thanks). So I am posting it here (java forum community is of higer quality when giving responses) , I hope …

0
199
Member Avatar for joshuathree

I am trying to cluster a sparse matrix with using K-means algorithm. I will use Apache mahout but I did not find any example about how can it be implement with Java. Is there any tutorial or function javadoc about it? I have tried KmeansDriver's run() function but I did …

0
98
Member Avatar for Morbs

I keep recieving an error on lines of code 77-80 and I'm not really sure what I'm doing wrong. They're all the same error and goes as follows: ----jGRASP exec: javac -g Program5.java Program5.java:72: error: cannot find symbol adultTickets = adultTicketPriceTextField.getText(); ^ symbol: variable adultTicketPriceTextField location: class Program5.buttonListener Program5.java:73: error: …

Member Avatar for Morbs
0
624
Member Avatar for jg1405

I am struggiling to correctly put together these two constructors, one adds an instance of an array class and the other searches for an int passed-in. public void Add(Appointment a) { Scanner s=null; for (int i=0; i<this.m_Appointment.length; i++) { m_Appointment[i]=a; a.Read(s); m_NumElements++; } } public Appointment Find(int appointmentId) { for …

Member Avatar for NormR1
0
155
Member Avatar for FUTURECompEng

I am going to be honest here, I am completley lost on trying to figure this out. I am trying to create a sudoku solver using sat4j for a 9x9 puzzle. I am trying to read a partially filled board and, by using a Satisability solver it finds a legal …

0
206
Member Avatar for jamesperkins0

Hi guys, so my task is as follows. A. Develop an application that reads your listings.txt file, analyzes the property listed per agent, and outputs a report to an agentreport.txt file. Your application should do the following: 1. Prompt the user for the name of the input file (listings.txt). 2. …

Member Avatar for jamesperkins0
0
469
Member Avatar for j.jroxs

my dillema is i dont fully understand this assignment. I also dont know if my array should be inside of class or inside of the void setString method. help import java.util.Arrays; class String { //data members private int SIZE = 25; private [] myString = new array[25]; public void setString( …

Member Avatar for NormR1
0
124

The End.