32,204 Topics

Member Avatar for
Member Avatar for Daigan

Hi, so my problem is I don't know how to read more than one line from a text file. say I have string.txt and it contains: Hello Java Hello World Welcome how am I going to read every line of the string.txt? I tried using FileReader and BufferedReader but it …

Member Avatar for Daigan
0
194
Member Avatar for jackmaverick1

Hi! I heard of a thing called Hotswap debugging, but I haven't figured out how to use it. I can't find a download anywhere, nor can I find a thing called hotswap debugging in the debug menu (I use Eclipse). Just wondering, Jack

Member Avatar for Ezzaral
0
109
Member Avatar for syspect

Hey, guys. I have A database with some Customers with some parameters. I made the Mapper (the connection class between the data base and the GUI). So... I create an object "Customer" (through the GUI) which has the parameters and then I store the object into another class CustomerList which …

Member Avatar for jazz_vill
0
190
Member Avatar for Nandomo

I am working with a tabbedpane with two panels on netbeans... I have a button action which switches panels, "setVisible()", but when it switches the panels the buttons on the first panel show if you roll the cursor over them. Any settings I can change in order to have my …

Member Avatar for jazz_vill
0
139
Member Avatar for singhs18

Ok so lets say I have any GUI that needs its contents changed while it is running, so that it will re-display the new contents. An example would be in my defaultlistmodel it would have: Exactors Diggers But once the user selects "Exactors" and moves to a new GUI which …

Member Avatar for singhs18
0
173
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
577
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
189
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
517
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

The End.