32,204 Topics
| |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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()); … | |
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 | |
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 … | |
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; … | |
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 … | |
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 … | |
Does anyone know how to set up the EasyIn.java class in netbeans IDE 6.9.1. If so please help! | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ..... … | |
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 … | |
[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 … | |
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 | |
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) … | |
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), … | |
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>{ … | |
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 … | |
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 … | |
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. | |
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 … |
The End.