32,199 Topics

Member Avatar for
Member Avatar for mrjeck2008

I need my program to take user input look throught the text file that is being read and find the the text and print back the corresponding text. In the text file I have a list of java compile time errors and their sample code separated by a colon. For …

Member Avatar for NormR1
0
575
Member Avatar for Nandomo

I am making an ATM machine and trying to get my accounts from a .csv file to an ArrayList and am having all sorts of issues. Can I get help? It is giving me problems on line 52 of the class where I read and put the items into Arraylist. …

Member Avatar for JamesCherrill
0
141
Member Avatar for n3red

Hi, I have 2 JTree components on my JForm. If a user clicks on a DefaultMutableTreeNode on JTree A i want app to add it to JTree B. [CODE] public void addModule(final JTree a, final JTree b){ a.addTreeSelectionListener(new TreeSelectionListener(){ @Override public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = new DefaultMutableTreeNode(a.getLastSelectedPathComponent()); …

Member Avatar for Ezzaral
0
259
Member Avatar for riahc3

Hello Im trying the ini4j library but I seem to be having problems writing a Unicode file (no problems reading I believe) Is this a Java issue or ini4j? Thank you

Member Avatar for riahc3
0
744
Member Avatar for Ntropy

Basically, i'm doing an exercise that requires me to decrypt some numbers in an array, which will then read out something about "THEO", i've written my code out in this way, and it compiles fine, but it's having a problem when i run it, i'm getting a problem with my …

Member Avatar for Ntropy
0
213
Member Avatar for kesh1000

hi all, I came through this question and was confused as to what and why the ans should be?? [CODE]String str = "10"; int a = new Interger (10);[/CODE] which of the following is legal: - choose any 3. a) str += a; b) boolean b = str == a; …

Member Avatar for Ezzaral
0
90
Member Avatar for dmtYork921

Hi, I was trying to figure this out. I've been scratching my head all morning and I'm at a mental dead end. Can anyone help me? Malicious code in red [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package …

Member Avatar for JamesCherrill
0
186
Member Avatar for itsmrshow

i need to compare these two arrays. one array in the lottotest class, method getdata gets the users numbers and stores them in an array. the nest in loto class, method gendata, generates 6 random numbers between 1-9. i need to then call both methods into the main method and …

Member Avatar for itsmrshow
0
314
Member Avatar for ZeroEddy

Does anyone know how to set up the EasyIn.java class in netbeans IDE 6.9.1. If so please help!

Member Avatar for stultuske
0
133
Member Avatar for j23

hi, does anyone know how it would be possible to change my code so that the circles drawn by the applet are resized as the applet screen size is changed? [CODE] import java.awt.Graphics; import javax.swing.JApplet; import java.awt.Color; @SuppressWarnings("serial") public class OvalApp extends JApplet { private int width, height, x=10, y=10; …

Member Avatar for j23
0
1K
Member Avatar for Morney

Hello, So I have started to learn java from scratch, and I love it, any time spare I try to create programs (nothing complex yet) The last one I have done is the game Pontoon, blackjack or 21, many names. It works to how I would like it to, but …

Member Avatar for Morney
0
745
Member Avatar for juliusmasa

Can you help me put actions to the buttons [code]public class TimeIn extends javax.swing.JFrame { /** Creates new form Timein */ public TimeIn() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of …

Member Avatar for stultuske
0
145
Member Avatar for new2GUIBuilder

Hye. I'm a new daniweb members. I've been learning java for 4years from zero. i became to not lazy in java programming since i have to do my thesis project in java. i am developing a very simple jave coding for my thesis. the objective is to print cheque. as …

Member Avatar for stultuske
0
158
Member Avatar for santakdalai90

I am a beginner in java. I wrote the following code in netbeans. [ICODE] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sanfile; import java.io.*; /** * * @author santak */ public class SanFile { /** * @param …

Member Avatar for santakdalai90
0
136
Member Avatar for Ahsan_1

hi ... i want to send mms from pc. and using jmmslib .....but here i have problem in jwap conection with mobile phone .... it timeout error .... how to make connection using Jwap ....?? what should else i need to get this ....? what steps should i do ..... …

Member Avatar for Rahmat1990
0
187
Member Avatar for twinkle2011

Hi guys, after my "Calculator" was done with your help. I'm planning now to create a new program using Java a "Basketball, 24 shot clock timer" I can't imagine how to start or how I can make a Shot Clock Timer using Java. I need your best advice guys and …

Member Avatar for hfx642
0
509
Member Avatar for jeraldmuthu

[CODE] import java.sql.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import java.io.*; import javax.servlet.ServletException; import javax.servlet.ServletConfig; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletRequest; public class MySer extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,java.io.IOException { String xml; Connection conn …

Member Avatar for hfx642
0
234
Member Avatar for Jah-Jah

how do you write a program that converts a number entered in Roman numerals to decimal? The dicimal values of the roman numerals are M 1000 D 500 C 100 L 50 X 10 V 5 I 1

Member Avatar for hfx642
0
74
Member Avatar for eve_91

Hi, Basically I am working on a uni project but I am pretty new to Java. I've been trying to figure out how to do this for days now but just can't get it right. Really need to get it done as the deadline is approaching! I have 3 (large) …

Member Avatar for eve_91
0
4K
Member Avatar for Ntropy

Hello there java gang. I've written a program which basically checks the dates that i have written for the program in question and then validates it against a set of rules, using arrays to ensure that what a user enters is valid. So for example, you can have 1,(day) 5,(month), …

Member Avatar for JamesCherrill
0
237
Member Avatar for jaxi

Tried to compile the following code and got these errors: [CODE]Course.java:43: incompatible types found : java.lang.String required: double double cStart = df.format(cStart); ^ Course.java:44: incompatible types found : java.lang.String required: double double cEnd = df.format(cEnd); ^ [/CODE] Here are my two classes: [CODE] import java.text.DecimalFormat; public class Course implements Comparable<Course>{ …

Member Avatar for jaxi
0
348
Member Avatar for willleung9

I need help coding this in java: Write a class named GroceryList that represents a list of items to buy from the market, and another class named GroceryItemOrder that represents a request to purchase a particular item in a given quantity. The GroceryList should use an ArrayList of type GroceryItemOrder …

Member Avatar for thines01
0
6K
Member Avatar for sidd.

hi, i have two drop down list. First one is populated from database and its working fine. Second one will also be populated from database but as per the value selected from the first drop-down list. [CODE]<head> <script type="text/javascript"> function xyz_list() { // xyz_list is the id of ;;my first …

Member Avatar for Ezzaral
0
168
Member Avatar for coolsport04

I understand the definition of canonical, but I need an example. For instance, what would the canonical form of the string [CODE]String s = new String("foobar");[/CODE] be? Thanks.

Member Avatar for gusano79
0
102
Member Avatar for msmorsan

Hi I have a JTable applet that implements querys with MySQL, and i have a couple of classes in my program. I made it using ECLIPSE, and when i run it using this code: <body> <applet code="AconsultaMysql.class" archive="mysql-connector-java-5.1.17-bin.jar" width="900" height="300"> </applet> </body> </html> It is in a package called webconsultas …

Member Avatar for NormR1
0
322
Member Avatar for chinee

this project is an order processing prograam for a flower shop Orders are checked to see how the payment is to be made. Orders may be prepaid or, if the customer has a good credit line, they must be invoiced. Credit must be refused if the customer has paid late …

Member Avatar for NormR1
0
338
Member Avatar for riahc3

Hey I was wondering how I could write a binary file in Java with code in C++ using the reinterpret_cast function. If I remember the line correctly (not currently at work) it was: [CODE] file.write=reinterpret_cast<char *(&x)>,sizeof x; [/CODE] with x being a variable. How can I do that in Java? …

Member Avatar for riahc3
0
933
Member Avatar for rotten69

Hi everyone, I'm doing a little experiment on Java loops.. I came across these infinite loops and they never wanted to stop .... Could anyone explain these loops to me, please. Thanks in advance. [CODE] for (int a=0;a <= 5; a++){ int c; int b= 6; for( c=0; c <= …

Member Avatar for rotten69
0
182
Member Avatar for vaironl

Hello forum, Vaironl here. I'm making a fairly big application for my IB- Computer Science class, and I'm having allot of trouble with the screen. I decided to use null layout to draw textfields, labels optionpanes, Jcomboboxes etc... a couple of things. In my computer it looks like this [URL=http://imageshack.us/photo/my-images/406/recipepicture.jpg/][IMG]http://img406.imageshack.us/img406/1593/recipepicture.jpg[/IMG][/URL] …

Member Avatar for vaironl
0
143
Member Avatar for Kmutax

Am using neatbeans 6.8 to develop java application,am able to package and deploy java programs and run them on my computer but when i package and deploy a java program with database it fail to connect with the 'com.mysql.jdbc.driver'.i know someone out there can just post on how to do …

Member Avatar for StephNicolaou
0
240

The End.