32,204 Topics

Member Avatar for
Member Avatar for jeffbeck8

okay I have it almost complete with one issue: When the report runs it is suppose to add up the property values for each agent and only display the total value of the properties. like:COMMERICAL FARM LAND RESIDENTIAL 101 600000.00 105 30000.00 106 200000.00 107 1040000.00 110 250000.00 but for …

Member Avatar for jeffbeck8
0
190
Member Avatar for harinath_2007

Hey all.. Happy new year .. I am insearch of converting the android application(apk) to java desktop application. I dont want to run it in some sort of emulators. I want to convert the apk file into java(J2se) desktop applciation and run it on my desktop. Can you suggest some …

Member Avatar for harinath_2007
0
120
Member Avatar for Carpetfizz

Hello, After a relatively small C++ background, I decided to learn some Java. I want to be able to pass two variables from my main class, evaluate them in another class, and return that answer to the main class. I have all the code done for it pretty much, but …

Member Avatar for Carpetfizz
0
171
Member Avatar for RaJsHaH.23

[import java.util.Scanner; import java.util.Random; public class HangmanMy { public static void main (String[] args){ System.out.println("Welcome to the game Hangman :)/>"); Scanner input = new Scanner(System.in); boolean done = false; String guess; String guesses = ""; char letter; int wrongGuess = 0; StringBuffer dashes; System.out.println("Choose a category -> places / games …

Member Avatar for corby
0
241
Member Avatar for -acir-

Do you have a sample code suggestion to predict illness to a blood type? Blood type is an input from the user and when the user inputs the blood type it would give you all possible illness for that blood type. Is that possible? Am using netbeans and not sure …

Member Avatar for -acir-
0
143
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
241
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
493
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
432
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
298
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
460
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

The End.