35,619 Topics

Member Avatar for
Member Avatar for VengefulToast

Okay, so I have a text file like this: I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn Calculus in One Day, 29.95 Feel the Stress, 18.50 Great Poems, 12.95 Europe on a Shoestring, 10.95 The Life of Mozart, 14.50 And, as you can see, there are …

Member Avatar for NormR1
0
247
Member Avatar for rlord3534

My program won't run.. I keep getting a nullPointerException but I have no idea why.. Thanks! The program is supposed to create a simulation for a line ---------------------------------------------------------------------------- public class Prog5 { /** * @param args */ public static void main(String[] args) { Simulation simulation = new Simulation(10); simulation.run(); } …

Member Avatar for NormR1
0
207
Member Avatar for nicolemarie

class P3 { public static void main (String[] args) { makeP3Picture(); } public static Picture makeP3Picture(Picture source) { String fileName = FileChooser.pickAFile(); String sourceFile = FileChooser.getMediaPath("butterfly1.jpg"); Picture sourcePicture = new Picture(fileName); Picture targetPicture = new Picture(source.getWidth()*3, source.getHeight()*2); source.explore(); source.copyPhoto(); source.show(); return sourcePicture; } } im getting the error: "makeP3Picture(Picture) in …

Member Avatar for stultuske
0
788
Member Avatar for iRamble88

#//Here is my simple class for MyCar# public class MyCar { private int odometer; private int speed; private int gear; public MyCar() //send values to member variables in this default constructor { odometer = 0; speed = 0; gear = 0.0; } public MyCar(int od, int sp, int gr) //constructor …

Member Avatar for JamesCherrill
0
256
Member Avatar for sonicx2218

[Link Anchor Text](http://oi44.tinypic.com/bwfaf.jpg) Hey dudes! I'm pretty crummy with Java layouts, so I was wondering if anyone had time to help me. The rather crude drawing I made is the layout I had in mind. I wanted 3 rows, with 1 gridlayout on the top and bottom, and in the …

Member Avatar for JamesCherrill
0
189
Member Avatar for VengefulToast

Will someone please tell me why I keep getting my custom file not found exception? The file is spelled correctly and is in the same directory of my java file. I am programming on Eclipse on Mac OS X. Here is my source: // Dillon Sheffield // Lab 10a // …

Member Avatar for VengefulToast
0
283
Member Avatar for jamie6441

I'm currently writing a program where the program reads in words from a .txt file and stores the data into an array. The user then has the ability to enter in entries into array and the program then writes everything to the txt file where it can be read again. …

Member Avatar for jamie6441
0
3K
Member Avatar for Stjerne

Hello, How can I get a bigger textfield? What I mean is: Let's say that I'm going to register a bunch of cars in a program I made. I want to register things like name, model, when it's made etc + description. I can make simple JTextFields for most of …

Member Avatar for JamesCherrill
0
115
Member Avatar for Thermalnuke

IF someone can write this code out for me so i can use it as an example for the rest of my problems and question i have to do I would really appreciate it alot. and no this question is not Homework what so ever I am a visual person …

Member Avatar for Ezzaral
0
185
Member Avatar for blivori

I have a GUI in which has a container for a JTable called 'listTable'. I want to populate the JTable with data stored in a linked list, using the AbstractTableModel. Basically, I have a LinkedList stored in Processing.java. It contains all the data retrieved from a text file. I created …

Member Avatar for ejosiah
0
1K
Member Avatar for Sadun89

I have a problem with netbeans.... Already I installed MySql. but in netbeans Services panal not mention anything about databases.. If I right click on their its not mention anything.. I want to add database through that. So how I can do it. What are the pre-Requirement to do this(Any …

Member Avatar for peter_budo
0
326
Member Avatar for wolwayne

My web hosting service provider allows me to uplaod my ROOT.war file only. and there is no directory structure. So is there any way by which I can upload pics and add new pages or make changes in existing pages without re-uploading the entire ROOT.war file. P.S. I also want …

Member Avatar for wolwayne
0
182
Member Avatar for c.pentasuglia

Would anyone happen to know also if there is some predefined swing box for prompting the user to decided whether or not to overwrite an exhisting file? you know the basic "This file already exists, would you like to overwrite it?"

Member Avatar for c.pentasuglia
0
107
Member Avatar for c.pentasuglia

In a nutshell i'm working with a program that uses JSCH and xstream to zip a file, and send it to a remote linux server. I'm using static folders, but when i send a file with the same name as one in the folder it will overwrite the exhisting file. …

Member Avatar for c.pentasuglia
0
182
Member Avatar for VengefulToast

Hi forum, I just need a little help on one thing, how can I import this text document and make it usable in a JList object for my GUI application? I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn Calculus in One Day, 29.95 Feel the Stress, …

Member Avatar for NormR1
0
136
Member Avatar for Hitman Mania

Hey, so this is my final java assignment for 1st year comp sci program. I really want to get a decent mark before exams, so please I need your help. I've been working on it hard, but this assignment is making me feel dumb :( I'm supposed to make an …

Member Avatar for NormR1
0
278
Member Avatar for best4050

I am using getRow() method of ResultSet class like: int rowCount = result.getRow(); but when i run the application, it gives me the exception that says: *The 'getRow()' method is only allowed on scroll cursors.* Please, anyone, who knows why it happened, explain it with some possible solutions Thanks!

Member Avatar for Ezzaral
0
221
Member Avatar for shean1488

Hi everyboy, I have a question how to add not boolean expression to the conditional loop, Imagine some situation where I have : while(some expression && another expression) { .... } So lets say I want to calculate how many times "another expression" was evaluated. I wish I would stick …

Member Avatar for shean1488
0
191
Member Avatar for nicolemarie

I need to count the number of votes for candidates... I'm getting an unreachable statement error on "int[] array = new int[6];" Scanner sc= new Scanner(System.in); int a= sc.nextInt(); return a; int[] array = new int[6]; int mitt; mitt= array [a]; int rick; rick= array [a]; int newt; newt= array …

Member Avatar for NormR1
0
244
Member Avatar for msmriyas

this is my sourse code,i have indicated the error in the bottom of the sourse code . import java.io.*; public class Queue { private int maxSize; private int queArray[]; private int front; private int rear; private int nItems; public Queue (int s) { maxSize = s; queArray = new int[maxSize]; …

Member Avatar for NormR1
0
158
Member Avatar for taher_sk2000

I want to update my database but the problem is that the driver is not taking any values from the preparedStatement. I am getting an error : java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] You must enter a value in the 'ClassicRoom.Occupy' field. Press any key to continue... Here is the ActionPerformed …

Member Avatar for taher_sk2000
0
180
Member Avatar for Shant
Member Avatar for JamesCherrill
0
45
Member Avatar for Samama

so i have to build an application where i have to read values from a csv file(excel)and insert them in mySQL.i can do the reading part however I'm fairly stumped by how do i insert the values to the database. Any help regarding this matter is apprecaited.

Member Avatar for thines01
0
157
Member Avatar for c.pentasuglia

Basically i'm wondering if i can fill the "File Name" field of a JFileChooser automatically. I'm pulling files from another machine using sftp, and specifying the file to be created with the JFileChooser. So that the file i'm transfering will be saved with the name and location i specify. As …

Member Avatar for JamesCherrill
0
297
Member Avatar for msmriyas

hello dears, please can anyone correct my java error, when i run bellow java source code error cause as can not find symbol. public class StackApp{ public static void main (String arg[]) { StackX theStack = new StackX(10); theStack.push(20); theStack.push(40); theStack.push(60); theStack.push(80); System.out.println("Value at top : " + theStack.peek()); System.out.println("Is …

Member Avatar for NormR1
0
215
Member Avatar for NoUserNameHere

Hi, I just started learning about java applets recently and was wondering why the shapes won't appear on screen when I press a button. import java.applet.*; import java.awt.*; import java.awt.event.*; public class Buttons extends Applet implements ActionListener { public void init() { button1 = new Button("Button 1"); add(button1); button1.addActionListener(this); button2 …

Member Avatar for NoUserNameHere
0
147
Member Avatar for prnjn

I have made a HRMS (Human Resource management System) using NetBeans 6.5 and for database MySQL 5 The project is completed and running fine ( great) without any problem when i run it in NetBeans using Run Main Project Button. Then i 'Clean and Build the project' and get a …

Member Avatar for NormR1
0
401
Member Avatar for migelitto

Hey guys. I'm making a project for my university. It consists of Jframes and other JStuff. I'm having problem with data. The problem is changing them. I have 2D array of Strings - numbers and words (but the content doesn't matter). I want to make a JFrame, where you can …

Member Avatar for NormR1
0
203
Member Avatar for tabish saroha

Dear All, Please Help me in this application.... My problem is that i want to select the required text from the following text. In this text I want When user input following text. I will get only special information from it. Abdoul Amin `23 av Olympiades 94120 FONTENAY SOUS BOIS …

Member Avatar for niranga
0
75
Member Avatar for DaAznSmurf

So my assignment is to design a simple GUI calculator using the stack data structure to perform additions, subtractions, multiplications and divisions. The calculator window should have at least two panels - one for display and the other for buttons (0 - 9, . , +, -, X, /, =, …

Member Avatar for NormR1
0
1K
Member Avatar for Anonymous123

I have an assignment to write a program in Java to implement the Natural Correspondence Algorithm for converting a linear list into a binary tree. The program should process its inputs in two steps: (a) It first builds a tree for a given input list (b) It then traverses the …

Member Avatar for Anonymous123
0
279
Member Avatar for cwpent

I'm doing a lesson that is supposed to demonstrate inheritance using the song Old MacDonald; there's an animal interface, a farm class that implements each animal object.. you get the idea. I've got two problems. First, The animal has a type and a sound, for example, a chick is [code] …

Member Avatar for joankim
0
1K
Member Avatar for Armanious

I'm trying to decompile this one method; I'm pretty sure its purpose is to take two integers and convert them to a single long, but I may be wrong and it can be just some weird math. What I have gotten so far: `long result = (((long)possibleHigh) << 32) + …

0
68
Member Avatar for cisumma

Hello I have written a MVC2 : DAO program using an Apache derby embedded DB. Currently I have not been able to jar the program : runs in IDE. My question concerns running this program on multiple work stations of a local network. Will this be possible? Currently when I …

0
82
Member Avatar for Doncripz

Hey guyz im beginner from java programming. Could anyone please help me fix my problem? I have this method ~~~ public void determineClassAverage() { Scanner input = new Scanner(System.in); int total; // sum of grade int gradeCounter; //number of grade to be entered NEXT int grade; // grade value int …

Member Avatar for Doncripz
0
5K
Member Avatar for Kprosser1029

Hi,I havent posted in over a year but I need a good starting point for a class project. We are using netbeans with glassfish. We have to create online Library. Below is my starting point. Any help is appreciated.I just need a starting point at this time. Im a little …

Member Avatar for peter_budo
0
108
Member Avatar for mehnihma

I need to pass buffer object which has generated values to construcor of reading class to print real time generated numbers. Which is the best way to do it? When I pass generated value I get the number but I need to pass values that are beeinig generated and writed …

Member Avatar for mehnihma
0
141
Member Avatar for dburris

Hello, I am attempting to enter two numbers via console in my test class and call a method in my main class to add the numbers and display the answer. Java doesn't like the Calculator.Calcuate(); code. It gives me an error of "cannot make a static reference to the non …

Member Avatar for NormR1
0
172
Member Avatar for bhanu1607

Hi, I have a requriement to convert all my properties files from English to Hindi to make my project internationalization. Can any one please tell me, is there any tool to convert my property files from one language to another language. I have found some language transulator sites, but it …

0
121
Member Avatar for 24x24

Hello, I have an assignment to convert some given jave code into c++. I am currently having an issue wherein when I run the program it tells me that: error C2660: 'approximateSqrt' : function does not take 1 arguments. Any suggestions for moving forward would be appreciated. I have the …

Member Avatar for 24x24
0
217
Member Avatar for Dmiller071

Hi all, I need to utilize a Graph Data structure for an assignment. I've understood the following code (posted below) until I came to the search function. The depthFirstSearch and breadthFirstSearch both require a Visitor<T> which is an interface. I'm not much used to interfaces, so I'm not sure where …

Member Avatar for Dmiller071
0
158
Member Avatar for justindill

Write a Java interface named Searchable with two abstract methods: one named Way2Search that returns a String and another named MaxTime that returns an Integer. Be sure your code compiles and runs as expected. Name your Java file Searchable.java. Although there is no compilitation errors, or any errors throughout the …

Member Avatar for JamesCherrill
0
329
Member Avatar for Sadun89

plz... I need to add images for drop down list..So how I do it?? This software deverlop in java platform using Netbeans. So this can't be use any Java Script.Can you? Because this is Desttop application .. plz help..

Member Avatar for Sadun89
0
149
Member Avatar for prnjn

**I am using NetBeans** i have a 'Search by employee id' button . I want when user click this button a dialogue box appear which take employee_id as input from user . then that input be used for fethcing data from the database ( desired table in DB has primary …

Member Avatar for prnjn
0
211
Member Avatar for prnjn

Hi. I am Using netBeans.. I have 4 JLists (i.e jList1 , jList2, jList3 , jList4) in 4 different tabs in frame. Each List has the value of employee_id from database (i successfully did it already) there are many field in tabs ( i.e rows of databse with employee id …

Member Avatar for prnjn
0
746
Member Avatar for nidheeshkumar.r

hey, i have a code snippet for implementing the co occurance matrix of a grey level image.The code is :- public class TextureExtraction { public static int[][] binImage; public static int height; public static int width; public static double[] coocFeatures=new double[48]; public static double[] getCoocFeatures(){ return coocFeatures; } public TextureExtraction(int[][] …

Member Avatar for NormR1
0
232
Member Avatar for mehnihma

I need help with this code. I get zero values, how can I stop generating numbers when I hit the target number? Thanks import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.util.concurrent.locks.ReentrantLock; /** * @author Marin */ public class TargetFinder extends JFrame { private static final long serialVersionUID = …

Member Avatar for mehnihma
0
165
Member Avatar for Transcendent

Does anyone know some algorithms for converting to bases such as octal, hexadecimal,and binary?

Member Avatar for JamesCherrill
0
122
Member Avatar for charlie.beat

Hello everyone, I am close to finishing this project, but i am stuck on my PhoneTest class. To be specific I am stuck on the Method printBill. (This is an Inheritance project). Their is a Date class for the month/day/year Their is a parent class which is the Phone class …

Member Avatar for charlie.beat
0
221
Member Avatar for arshad115

Hello, I am making an application for Android that will save users voice command and then while the application is running; compares the realtime data from the mic input to the one that is saved. So far I have saved the voice in wav file now I want to compare …

0
146

The End.