32,199 Topics

Member Avatar for
Member Avatar for JavaPrograms

My task is to: Pick 10 of my favourite NBA or NHL players from 2 top teams and display the player name, team name, points, rebounds, and assists for each of them. I then have to store this information as a table in a .txt file (This part is completed). …

Member Avatar for David Kroukamp
0
425
Member Avatar for xanawa

Hi i am trying to connect with the data base with the following code but it is giving me an error. [B]CODE:[/B] [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dbaccess; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import …

Member Avatar for stephen84s
0
229
Member Avatar for crbsathy

Hi Friends, I have a doubt in accessing the memory address . In java there is no pointers like c . then how can we access the address of the memory variable.

Member Avatar for JamesCherrill
0
1K
Member Avatar for gourav1

hello! i m reading servlets these days and i want to read about structs and sessions.please give me links here so that i can read about them and so that i can make some application(web) based on concept of these two. i have searched google and also find many things, …

Member Avatar for stultuske
0
129
Member Avatar for gourav1

please tell me what exactly buffer is ? i have searched google.com a lot but not find what exactly it means ? what it means if i say "flushing the buffer"..? please tell me..what exactly is it ??

Member Avatar for gourav1
0
141
Member Avatar for gourav1

[CODE]PrintWriter file= new PrintWriter(new FileWriter("league1.txt",true)); file.print(value1); file.print(','); file.print(value2); file.print(','); file.print(value3); file.print(','); file.close();[/CODE] i m using this code to write in a file.. i m using this in servlet.value1, value2,value3 are Strings. and i wana to write it in file named "league1.txt". i have made this file in WEBPAGES folder in …

Member Avatar for gourav1
0
268
Member Avatar for anand01

[CODE] Set<Integer> set = new HashSet<Integer>(); Integer i1 = 45; Integer i2 = 46; set.add(i1); set.add(i1); set.add(i2); System.out.print(set.size() + " "); set.remove(i2); System.out.print(set.size() + " "); i1 = 47; System.out.print(set.toString()); set.remove(i1); System.out.print(set.size() + " "); [/CODE] The result of this code is 2,1,1 but my expectation is 2,1,0 Could any …

Member Avatar for anand01
0
114
Member Avatar for scheppy

I have a extremely small problem, I think its my own fault, but i just cant seem to find what it is. I'm making a program with a gui, and in the gui there is a main menu with 2 JButtons. When I click on a JButton the JPanel/JFrame is …

Member Avatar for scheppy
0
165
Member Avatar for dennysimon

hello all my part of code give me message to recompile with -Xlint:unchecked How to fix this code so the message gone thank you denny [CODE] if(file.exists()) { FileRead fr=new FileRead(); String astring=fr.Read(filePath); System.out.println(astring); /* delimiter */ String delimiter = ","; /* given string will be split by the argument …

Member Avatar for dennysimon
0
2K
Member Avatar for Jenna1994

this is the program i have to write you have to write a program using java language which will realize the following scenario project scenario:when you run your program it will display a welcome messege (you choose ur welcome messege). then program will ask to input a number beetween 1-9999, …

Member Avatar for Philippe.Lahaie
0
182
Member Avatar for thejoker011

hello everyone... i need some good open source Graphs and Charts gui(2d and 3d) for java. Please suggest me some.

Member Avatar for peter_budo
0
299
Member Avatar for akingcool

I am trying to design a file reader with some sort of GUI so I decided to use JOptionPane. I am a complete noob trying to learn java. So far, I have managed to make my program produce a pop up for the file location, and also an error message …

Member Avatar for mKorbel
0
3K
Member Avatar for if10066

I have a project, it's simple game just to make a game called congklak. it is traditioanl game from Indonesia. The project has finished, and work, well compiled, all components like package, database (*.mdb), and all the pictures are read by programs. But when it's deployed, the pictures and database …

Member Avatar for stephen84s
0
179
Member Avatar for ujjwal koirala

complie first java type the fllowing command & view the bytes codes java-c first.

Member Avatar for thines01
-3
34
Member Avatar for ramanareddy438

I installed Java using .bin file. The folder i installed is JDK(/usr/lib/jdk1.6.0_29) and JRE(/usr/lib/jre1.6.0_29). I googled to set classpath but that things didn't work for me. Can any one suggest me commands using the folders that i mentioned above, to set classpath to execute a sample java program.

Member Avatar for ramanareddy438
0
238
Member Avatar for gourav1

hey! i have made a List object as follows: List error = new LinkedList(); and then as per my requirements, i have added strings in it. like error.add(); like this. so, now at some time, i want this list to be empty, so i was doing error=null; which is giving …

Member Avatar for gourav1
0
137
Member Avatar for Mr.BunyRabit

Hey there, is there a way to convert a string to a tree path? i can convert a path to a string, but not the other way around... [CODE]jTree1.getSelectionPath().toString()[/CODE] thats the only way i know.. nooo idea how to convert it back??

Member Avatar for Mr.BunyRabit
0
870
Member Avatar for Mr.BunyRabit

Hey there. I have a program that uses access, and everytime i go to install it for some one i have to keep my fingures crossed and hope they have office installed on their pc. Is there a way to run my program without buying microsoft office? (using access database) …

Member Avatar for Mr.BunyRabit
0
801
Member Avatar for deepdon

I am getting java.lang.nullpointer exception for this code plzz help me out all database linked programs are creating same error [code]import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class retser extends HttpServlet { Connection c; Statement st; ResultSet rs; ServletConfig config; public void init() { config = getServletConfig(); try …

Member Avatar for stultuske
0
140
Member Avatar for Priya Dharsini

import java.net.*; import java.io.*; import java.util.Date; import java.util.*; public class crawling { //Properties private String startUrl; private int maxUrls = -1; private boolean limitHost = false; private boolean crawling = false; private Date currentDate; private int counter=0; // Set up crawl lists. HashSet crawledList = new HashSet(); LinkedHashSet toCrawlList = …

Member Avatar for stultuske
0
321
Member Avatar for scheppy

Im trying to make a simple program.It just has a couple JButtons and JTextFields, but its looks kinda odd, and I was wondering how to change their size. Thanks In advance Scheppy

Member Avatar for scheppy
0
79
Member Avatar for donlee

Dear Master, I have some confuses problem, I have an java window application that has been used almost 2 years more, suddenly today, when i run the application, error message come out "this application is corrupt". I try to run in others (almost 5 workstation), the result is same. any …

Member Avatar for dmanw100
0
191
Member Avatar for lethal.b

I have to create a midlet using netbeans. It says have 1 form that allows the user to enter data. Second form shows a gauge. The third form displays results. It must also have 2 threads. 1 thread that reads the users input and another thread that carries out some …

Member Avatar for dmanw100
0
118
Member Avatar for sunmania

Hi Friends how to extract following data and store in string variable. All variable are string no need to use any other data type like datetime and so on. [CODE] Deposits and Additions Date Description Amount Refe 11/01 Test1 201f13050000100 NEWEDGE 1,500,000.00 OBI:FFC SAN LAZARO, SA A/C 430 11/01 Test2 …

Member Avatar for dmanw100
0
2K
Member Avatar for scheppy

[CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; /* *Created by ************ *on Dec 28 *to calculate the area of multiple shapes */ public class AreaCalculator extends JFrame implements ActionListener { static JTextField triwidth, trihieght, recwidth, reclength, cirradius; static Container contentPane; static JPanel infoPane; static double circlearea; static JLabel circleanswer; public …

Member Avatar for scheppy
0
248
Member Avatar for lxXTaCoXxl

Does anyone here use Visual J#? If so can you provide some examples of syntax as well as examples of loops (for, foreach, do, while), declaration of variables, importing namespaces, how to build form style applications (a link would do on that one), and any further information you feel would …

Member Avatar for thines01
0
86
Member Avatar for morred

Heya, still rather new to programming, I'm having trouble understanding NullPointerException. The code below throws NullPointerException at rows 30 and 92. I do not quite understand why (as I understand it row 30 won't be run before the objects are created)? Any help would be appreciated!! [CODE]public class Uppg5_OH { …

Member Avatar for morred
0
156
Member Avatar for MrBillyUK

Hi all! I am having some trouble displaying the whole of a file within a JTextArea. The problem is that every new line of code that's read is showing within its own JTextArea rather than the text being displayed within a single JTextArea. I assume that the problem is something …

Member Avatar for MrBillyUK
0
145
Member Avatar for rhfh

Hi there, Any recommendation on Java books for starter? Just received an assignment on doing a cinema booking system.. Normally how long will it takes to complete this program? The lecturer gave us 2 weeks to complete this assignment, is it reasonable? Thanks for your kind reply. Cheers, happy new …

Member Avatar for rhfh
0
119
Member Avatar for 2concussions

hello. i am trying to make a text editor. i can't figure out how to get the file that i select in the JFileChooser to show in the JTextArea. and I also can't figure out how to get the text from the JTextArea to save into a .txt file. [code=java] …

Member Avatar for 2concussions
0
439

The End.