32,199 Topics

Member Avatar for
Member Avatar for Pobunjenik

Hello, I'm Mirza and I'm in the first semester of an IT university. I like to experiment with Java, and occasionally I run into problems. Now, I've been visiting daniweb for quite a while now, and I've always found solutions to my problem, but this particular problem I just can't …

Member Avatar for JamesCherrill
0
430
Member Avatar for jeffbeck8

link to old post shows code: http://www.daniweb.com/software-development/java/threads/440001/output-incomplete-text-file program to: 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). …

Member Avatar for jeffbeck8
0
159
Member Avatar for 03hasnam

I am finding it difficult to update the `JTable` when I enter a person's name in search button. The program compiles correctly without any errors, but in `SearchActionPerformed` event when the search button is pressed an empty table comes up. Where without search, the table is full of values from …

Member Avatar for tux4life
0
558
Member Avatar for shotokanpoloto

I've got this exception after running my project Really don't know what to do! SQLException: No suitable driver found for jdbc:derby://localhost:1527 I've add derbyclient.jar to Library.but I didn't get any different result.I also don't want to create a new database. I wasn't able to attach it here but here are …

Member Avatar for shotokanpoloto
0
563
Member Avatar for anki7

Hi, I need to generate a dynamic bar graph in excel.The code is in java and related technologies.On my site when a click a button 'generate graph for selected values' i should to get a bar graph in excel.Since the values selected can change and also the data associated with …

Member Avatar for priya89
0
240
Member Avatar for Osaid9

hello i'm trying to code 'Save Button' which saves all the information in a file this is what I did: private void SaveButtonActionPerformed(java.awt.event.ActionEvent evt) { java.io.File file=new java.io.File("File.txt"); try { java.io.PrintWriter output = new java.io.PrintWriter(file); output.print(this.DateObject.getText()); output.print(this.NoteObject.getText()); output.close(); } catch (FileNotFoundException ex) { System.out.println(""); } } the problem is if …

Member Avatar for tux4life
0
4K
Member Avatar for Violet_82

HI all, I am having a little problem with the following program. Here are the files: Player.java: import java.text.DecimalFormat; public class Player { private String name; private double average; public Player(String name, double average) { this.name=name; this.average=average; } public String getName() { return name; } public double getAverage() { return …

Member Avatar for Violet_82
0
190
Member Avatar for 03hasnam

Hi, I have something wrong at table_academicMouseClicked() method which results me with a java.lang.NullPointerException error. basically trying to compare the surname in Jtable and look it up on the database to select the corresponing record so that I can set the label to the value from database. So when a …

Member Avatar for Taywin
0
491
Member Avatar for sciwizeh

Hello, I have some java code I want to port to C++, and first class in the Heirarchy has me stumped. I'm trying to port a simple parsing framework as an exercise to figure out how it works internally, and almost everything in the framework requires, uses, or is `PubliclyClonable` …

Member Avatar for sciwizeh
0
431
Member Avatar for IcyFire

Hi, i'm making a server client piant program that send what is painted on the server to the client(and vice versa). this program is supposed to use instruction based transmission of the image. i have a server client program that sends what is drawn on the server to the client …

Member Avatar for IcyFire
0
297
Member Avatar for Darshan5

Hello.. I created a project in netbeans. I have a JFrame form. It has a JTable in it. I want to insert the database data in this JTable. Can you please help me. I would appreciate if you show me a sample code. Please dont tell me to add rs2xml …

Member Avatar for tux4life
0
63
Member Avatar for vipin.luhach

***How To UpDate JTable on Delete Command and if given id don't match with database then a message show "id is not available " My Codes as follows:-*** private void Sf_Reg_delete_ButtonActionPerformed(java.awt.event.ActionEvent evt) { String str2 = JOptionPane.showInputDialog(null, "Please Note that this Reg No is not generated again : ","Enter Reg …

Member Avatar for tux4life
0
191
Member Avatar for zlloyd1

This is my program so far: package allin1; import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Allin1 { JFrame frame = new JFrame(); JPanel panel = new JPanel(); JButton b1 = new JButton("Exit"); public static void main(String[] args) { panel.add(b1); //THIS IS THE PROBLEM?? } } The error I am …

Member Avatar for tux4life
0
328
Member Avatar for 03hasnam

I am unable to execute the editProfile() method in MainMenu class. The purpose of the method is to be able to extract the bean values and display them on the empty textfield. I am not sure if i did it correctly. any recommendations for any changes to editProfile() method. public …

Member Avatar for 03hasnam
0
508
Member Avatar for Osaid9

i'm trying to show date in a text field this is what I did java.util.Date date=new java.util.Date(); this.DateObject.setText(date); and its wrong... please help & thank you.

Member Avatar for JamesCherrill
0
169
Member Avatar for sid78669

I was trying to set a UniqueIdentifier based on Long. The objective was to give a certain custom Object a unique identifier in order to allow me to store them in a hashmap. I saw someone trying to use the most significant bits. So I realized that the addition of …

Member Avatar for ~s.o.s~
1
458
Member Avatar for reuel3

What's wrong with the following code? public void fillByteArray(InputStream s, byte[] b, int offset, Integer numReads, int readAmount){ while (numReads > 0){ s.read(b, offset, readAmount); offset += readAmount; numReads--; } }

Member Avatar for bguild
-1
243
Member Avatar for utkarshsahu

My aim is to fill a 3x3 grid of Jtextfield in java swing with values and position of entry in that grid sourced from a text file.I made a file named aa.txt. Its contents are:- a1-3 b3-9 c2-4 a1,b3,c2,... are names of textfields in grid and numbers separated by hyphen …

Member Avatar for JamesCherrill
0
372
Member Avatar for utkarshsahu

I am attempting to make a TicTacToe in java using Swing. Instead of using buttons for mark(x and o) placing on 3x3 grid, i used textfield(variable name- pos) to specify position of mark entering and another textfield(var name- val) to take value to insert it into the position which i …

Member Avatar for tux4life
0
206
Member Avatar for nickerst

So I have been working on this project for quite some time and I can't figure out why I keep getting an "Illegal Start of Expression" error. I tried moving the variables above the main method and that only returned the same error but instead of the error occuring at …

Member Avatar for nickerst
0
319
Member Avatar for IcyFire

I have this paint program and i'm having a very silly problem. I'm trying to set the paint area to west position using border layout but when i do that it doesn't show up when i run the program. if i set it in the center it shows up. everything …

Member Avatar for IcyFire
0
695
Member Avatar for Aditya_4

class Emp { int name, emp_no, addrs, ph_no, deprtmnt, post, project; Emp(int a, int b, int c, int d, int e, int f, int g) { name=a; emp_no=b; addrs=c; ph_no=d; deprtmnt=e; post=f; project=g; } Emp(int a, int b, int c, int d) { name=a; emp_no=b; addrs=c; ph_no=d; } Emp(int a, …

Member Avatar for Aditya_4
0
203
Member Avatar for mukororokudo

Hello Everybody, i'm having a problem with my code. I'm making a word reverser program though I'm not that much knowledgeable about java. The output that I'm aiming for is something like this "olleH dlroW" by inputting "Hello World" string. I'm getting the output that I'm looking for when I'm …

Member Avatar for JamesCherrill
0
229
Member Avatar for Viped

Hi. I have a problem with launching my application as applet. The game runs fine as an application. my applet code: package net.viped.breakout; import java.applet.Applet; import java.awt.GridLayout; public class GameApplet extends Applet { Core core = new Core(); public void init() { setLayout(new GridLayout()); add(this.core); } public void start() { …

Member Avatar for jalpesh_007
0
247
Member Avatar for eikal

hello, i have made the code below. however, when comparing the two strings they are not equal when in theory i thought they would be. String word="abc"; String d=""; d += "a"; d += "b"; d+= "c"; if(word==d) { System.out.println("IS EQUAL"); } When i just print out string d it …

Member Avatar for eikal
0
247
Member Avatar for sparkthesunoff

I need to write a program that can draw stuff on a frame, let's say, trees. Their IDs, colors, positions etc. are in a **txt file**, line by line, the first word of the line is the name of their type which will be the name of the subclass. These …

Member Avatar for tux4life
0
801
Member Avatar for vishalonne

Hello I have 5 jtextfield in my jframe with 5 jbitton. I just want to move the cursor from jtextfield1 to jtextfiled2 and then to jtextfield3 and so on when I press tab key. This can be done in C# very easily by setting the tab sequence while designing the …

Member Avatar for Rajshri Patil
0
102
Member Avatar for trishtren

hello, Iv been trying to write a java program to read an image from a list of images in a file I.E: * File * Filename * Image1 * Filename * Image2 * Filename * Image3 The problem i am having is that the filename's are string objects followed by …

Member Avatar for vishalonne
0
145
Member Avatar for bsunkel

Hey there! I have been trying to get all my JTable cells to be not Editable so you can't change the info displayed on the JTable. It sounds easy to do but I cant seem to do it. Any help would be appreciated Thanks!!

Member Avatar for sdasdasd
0
8K
Member Avatar for vikarna

Hi, i want to read the data from text file and write to excel file. if some one has ready code written then please share with me.

Member Avatar for peter_budo
0
2K

The End.