32,204 Topics
| |
**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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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(); … | |
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 … | |
**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 … | |
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 … | |
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); } | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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. … | |
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( … | |
hi . i need help.You are asked to implement a set of programs to simulate a group of users being logged onto a computer network. Users may be added, deleted, modified, displayed and searched for at any time. A method to test whether a user’s name is a palindrome (a … | |
public class J_01_FLOW_08 extends JApplet { JPanel p = new JPanel();//nedd a jpanel to add scroll String s_value[] = {"black","red","pink","yellow","blue","orange"}; DefaultListModel dlm = new DefaultListModel(); JList l_list = new JList(dlm); JScrollPane sp = new JScrollPane(l_list,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); JLabel l_label = new JLabel(); Container c; FlowLayout flow = new FlowLayout(); public void init() … | |
How can I extract the main classname of a java file ? I am doing this in php! I will read the whole java program as a string! Please help! <any_type/public/private/static> class **MainClass** { //Could be anything over here! public static void main(String[] args) { System.out.println("Hello World!"); } } | |
how can i implement a polynomial class using the doubly linked list data structure such that each node of the list holds the coeffient and the exponent of the term ? | |
Hello, I am unable to register the right key event from this program. Besides setting the focus of JPanel to the KeyListener, I am not sure what else can be done. I will be grateful for any help. Thank you! import java.awt.*; import java.awt.event.KeyListener; import java.awt.event.*; import javax.swing.*; public class … | |
hi Guys, I am currently coding for a GUI based program that delivers the amount of time a tutor works in minutes and the amount they go paid total, giving them details on the amount of time work total, and wage per hour and if it is below, minimum, or … | |
Hi.I created a jtable and imported a table from mysql there.now i created 3 jtextfield and 1 jdatechooser.Now i want to see the value of any row in the jtextfield and and jdatechooser when a row is clicked.I created the following method for this.It worked for the textfield but didn't … | |
I'm curious. Why is so much code in this forum formatted like this [CODE]if (something) { do something } else { do another thing }[/CODE] rather than [CODE]if (something) { do something } else { do another thing }[/CODE] The first version is harder to read and takes up more … | |
Hi all, A question asks me to write overloading functions to square,circle ,rectangle and triangle.... But since the square and circle have only one parameter I had to change the parameter of area of circle to double...... Is this the only way to accomplish this..... Are there any other ways … | |
import java.util.*; public class Elway { public static void main(String r[]) { ArrayList[] ls = new ArrayList[3]; for(int i=0; i<3; i++) { ls[i] = new ArrayList(); ls[i].add("a" + i); } Object o = ls; do3(ls); for(int i=0; i<3; i++) //insert code here } static Object do3(ArrayList[] a) { for(int i=0; … | |
I need your urgent help. Please help me to solve it out. Thanks a lot in advanced for your time. error: java.lang.StringIndexOutOfBoundsException: String index out of range: 150 Lines of code in this place there: if (text.length ()> 150) { text.replaceAll summary = ("<[^>] *>", ""). substring (0, 150) … |
The End.