32,199 Topics

Member Avatar for
Member Avatar for whiteyoh

Hi all, Im fairly new to java. Im wanting to connect to mysql but the following is thrown Exception: com.mysql.jdbc.Driver have i missed something? here is the code [code] import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class MySql { public static void main(String args[]) throws Exception { Connection con = …

Member Avatar for javaProgrammar
0
7K
Member Avatar for 1314abc

i need to rush my assignment due to my date line. so this is the problem i having. the question say note on design and implenment[Event Classes, Listener Interfaces, Simple file handling, The LinkedList Class] -Memos waiting for attention in a department of a commercial company could be actioned in …

Member Avatar for NormR1
0
104
Member Avatar for deiago

Hello Java friends I'm trying to make a program, using NetBeans, to allow users to scan (using a external scanner) ISBN numbers on books and using this ISBN number to link up to a website to retrieve the information regarding the book(i.e Title, Author, etc). I have not tried using …

Member Avatar for Stefano Mtangoo
0
122
Member Avatar for Stefano Mtangoo

I know it sounds stupid but I want to try this with the kind of for (not the norma for i=0 i<9; i++) but the other one with arraylist. is this possible? If yes please help me match data types Thanks [CODE=JAVA] import java.util.ArrayList; import java.util.List; /** * Created by …

Member Avatar for Stefano Mtangoo
0
126
Member Avatar for ppotter3

Hello! My name is Page, and I am learning how to code in Java. I am working on a program, and it was homework at one time, but the assignment due date is passed. I would just like to get it going so I can learn from my mistakes, and …

Member Avatar for NormR1
0
705
Member Avatar for daudiam

The API says that the implementation of BlockingQueue are thread safe, but about the drainTo method, it says : [QUOTE]"This operation may be more efficient than repeatedly polling this queue. A failure encountered while attempting to add elements to collection c may result in elements being in neither, either or …

Member Avatar for daudiam
0
784
Member Avatar for NewOrder

what i am trying to do here. is to let the user type a hexadecimal number [code]http://en.wikipedia.org/wiki/Hexadecimal [/code] and then display it. [code] import java.io.*; class Ex23 { public static void main(String[] args) { Console console=System.console(); System.out.println("please type a hexadecimal number"); String input; input=console.readLine(); int number; int number=Integer.parseInt(input); int count=0; …

Member Avatar for stephen84s
0
286
Member Avatar for just asif

hi i am a bioinformatics student.i am working on a project which is a tool i.e. a small software. i want to use API doc of biojava which involve the classes that help biologist in coding.some one have knowledge of it? its cookbook is available online but me unable to …

Member Avatar for Krefie
0
75
Member Avatar for larrif

[TEX] [B]PFA the image of the chart that has been created using jfreechart, I need to append another series of data as percentage value. That value will be overlapping with already present percent value, since my interval is 25,000. Intervals are being generated by itself in JFreechart depending on the …

Member Avatar for larrif
0
87
Member Avatar for jt86442

[B] Hi, I'm unable to change the font colors by using java. Can u please help me that how can i change the font colors in java. If you possible please share that respective Font Code. [COLOR="Green"] Thansk & Regards, Jayavardhan Tummidi. [/COLOR] [/B]

Member Avatar for NormR1
0
622
Member Avatar for NewOrder

what i am trying to do here, is to make it possible for the user to type 2 lines, and then say(or display) whether the string of the first sentence correspond to the string of the second sentence. so for example: first sentence: i will go shopping second sentence: Tomorrow, …

Member Avatar for NormR1
0
207
Member Avatar for daudiam

I tried to do this [CODE]ArrayList<String> a=new ArrayList<String>(2); a.add("dss"); a.add("dsfs"); a.add("fsfs"); [/CODE] Though i have specified a limit of 2 on the collection, i am able to add more. If this is general about Collections, is there any Collection which sets a limit and strictly follows it ?

Member Avatar for daudiam
0
79
Member Avatar for mohit_king

Here is the java code to search for multiple patterns in multiple lines...i m not able to go back to the previous pattern using this code... try tomake an xsl file in the link provided in folder and give the same pattern somewhere in the xsl...and do tell me the …

-1
30
Member Avatar for TrustyTony

This is must read if you learned Java before Python: Python Is Not Java: [url]http://dirtsimple.org/2004/12/python-is-not-java.html[/url]

Member Avatar for snippsat
1
651
Member Avatar for gingerfish

Please help me =( I'm not native english speaker, therefore some things might be not clear here I have 2 separate files: [B]Main.java[/B] and [B]Open.java[/B] inside [B]main.java[/B] there is a GUI and it has a [B]JTextArea[/B]) where i want to show text (variable) called from [B]open.java[/B] in [B]Main.java [/B] i …

Member Avatar for adams161
0
3K
Member Avatar for WargRider

Well, I am actually making a custom 2d turn based gaming engine in Java. So far I have actually gotten a solid based down, the ability to load a seamless game world (no instances) as well as a layered world, with a terrain layer, buildings layer, unit layer then an …

Member Avatar for moutanna
0
155
Member Avatar for i2avi

Hi, I'm working on an assignment and, after a significant amount of googling and reading through my textbook, I can't seem to find a tutorial for anything similar to what I need to do. My aim is to produce a tool which draws a line on the screen based on …

Member Avatar for NormR1
0
107
Member Avatar for fraenckel

I need to write some software to catalog files in a directory hierarchy. The directories of this hierarchy nominally follow this structure: Country City Technology_Type Date Files are then placed under the Date directory. The problem is that until now, files are copied into the hierarchy manually. Occaisionally files have …

Member Avatar for fraenckel
0
108
Member Avatar for asad_80

Hi, I am building a game in which i have used array for applying 52 button, which works fine.But when i try to use Action Listener with the array of button and try use setEnable(false)or true it does not work.I am also sending my. [CODE] import javax.swing.*; import java.awt.BorderLayout; import …

Member Avatar for NormR1
0
143
Member Avatar for djenoe

this is my final code,, would you pls help me get this right java Menu driven code choices only in letters A, B , C [code] import java.util.*; public class Letters { public static void Menu() { System.out.println("Menu"); System.out.println("A. Summary report for a sales employee "); System.out.println("B. Print a pattern"); …

Member Avatar for javaAddict
0
134
Member Avatar for david cashin

Hi everyone, I am fairly new to programming, but I was wondering if there was a way to run the java program i make when it is not in the bluej compiler (i am using bluej). I would like so that i can double click an icon and my applet …

Member Avatar for NP-complete
0
1K
Member Avatar for gokul.raja

Hi, I have a problem in repainting in a JPanel. Situation: I have a ButPanel which extends JPanel. In this panel I draw some sequences with some text along with it, by overriding paint() method. Eventually the screen size exceeds as input increases I use a CompareFrame which extends JFrame. …

Member Avatar for gokul.raja
0
108
Member Avatar for wendellrob

Can anyone tell me why I get the following error message when I execute this code: `Exception in thread "main" java.lang.NoSuchMethodError: main` public class Pay { private double hoursWorked = 40; private double rateofPayPerHour = 10; private double withholdingRate = .15; private double grossPay; private double netPay; public void main(String[] …

Member Avatar for mitch9654
0
219
Member Avatar for kiwisteffu

Hello everyone! I've been lurking the forum for quite a while and decided to come to get some help as well. :) Right now I'm learning stacks and the like. I have to work on a program to write code to create a program that will use stacks. I'm not …

Member Avatar for vee_liang
0
108
Member Avatar for 1x4n

hi all i want to create an xml file from an array i've been googling but can't find the right one the closest one that i get is in [URL="http://www.higherpass.com/java/Tutorials/Building-Xml-With-Java-And-Dom/"]http://www.higherpass.com/java/Tutorials/Building-Xml-With-Java-And-Dom/[/URL] but it doesn't create an xml file like i wanted to i want to print and create it like c:\xml …

Member Avatar for 1x4n
0
178
Member Avatar for kiranpvsr

hello there Can anyone please tell how to create 2-D graphs in Java ? (X-axis and Y-axis stuff)

Member Avatar for Taywin
0
70
Member Avatar for Dorayaki

Hello, I try to do a program that can search whatever the user typed. But I kind of having a problem, which I cannot select everything matches. For example, I type "Hi there hello, what is your name ? please say hello" The I click on the search button. It …

Member Avatar for Taywin
0
97
Member Avatar for NewOrder

[code]import java.io.*; class Ex4 { public static void main(String[] args) { Console console=System.console(); String input; System.out.println("Please enter the number"); input=console.readLine(); int number; number=Integer.parseInt(input); int sum; sum=((number/10)*10); switch(sum) { case 60: System.out.println("E"); break; case 70: System.out.println("D"); break; case 80: System.out.println("C"); break; case 90: System.out.println("B"); break; case 100: System.out.println("A"); number=100; break; default: …

Member Avatar for NewOrder
0
85
Member Avatar for aladar04

i am newbie in java programming. So as a beginner, i need to understand technical terms from developers like you. Please answer the question in a way that a beginner like me would understand. I don't like links, i want a definition from you. Thanks a lot in advance.

Member Avatar for JamesCherrill
-1
69
Member Avatar for mahmoudali
Member Avatar for rch1231
0
58

The End.