32,199 Topics
| |
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 … | |
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 … | |
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? … | |
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 <= … | |
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] … | |
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 … |
The End.