32,199 Topics

Member Avatar for
Member Avatar for bibiki

Hey there, I am building a small database app where I allow users to input and retrieve information in and out of database. As part of my application I have this table courses and a java file Course.java that models a Course object. My Course objects have field variables courseID, …

Member Avatar for JamesCherrill
0
113
Member Avatar for moonL!ght

i am reading from file the file is in this format 4 L 100 20 30 200 R 30 20 50 100 O 20 100 100 40 L 30 50 100 100 I'm using string tokenizer now the 4 specifies how many lines I'll have When I read only the …

Member Avatar for JamesCherrill
0
125
Member Avatar for libathos

hello,I am writing a program in java in which I use a jtable to print the data to the users.Do you know how can i get the data of a line when that line gains focus?

Member Avatar for libathos
0
85
Member Avatar for 03hasnam

[B]Hello Guys, Hope youre all well :) Please can someone kindly tell me how I can write to a specific line. The value to be written needs to be in long and not as a string. The File is as follows: 1324214082786 1313131 Paid 0.0 the seconds line is time …

Member Avatar for JamesCherrill
0
461
Member Avatar for 03hasnam

[CODE]/*********************Pay Button Listener***************************************/ public class payListener implements ActionListener{ public void actionPerformed(ActionEvent e) { String fileName2 = "Ticket/"+ticketIDNumber+".dat"; File ticket2 = new File(fileName2); if(ticket2.exists()){ try{ FileReader fileReader = new FileReader(fileName2); BufferedReader bufferedReader = new BufferedReader(fileReader); bufferedReader.readLine(); //OMIT Entrance Time FileWriter fw = new FileWriter(fileName2); BufferedWriter bufferedWriter = new BufferedWriter(fw); //fw.write("Hello"); bufferedReader.close(); …

Member Avatar for 03hasnam
0
174
Member Avatar for DoubleGee

Hello, I am experiencing problems when trying to remove elements from an array. I've been asked to create a little program which creates bank accounts containing (name, address, bank account number, balance etc.). I have successfully implemented all the functions except deleteAccount (I would also like to add that my …

Member Avatar for JamesCherrill
0
197
Member Avatar for apapap

This is the piece of code which i am running : [CODE] public static void main(String[] args) throws Exception { System.out.println("Registering Plugin..."); ServiceConnection connection = ServiceConnection.CreateServiceConnection( "ServiceInstance" ); connection.connect(Constants.VCENTER_URL,Constants.VCENTER_USERNAME,Constants.VCENTER_PASSWORD, true); VimPortType service = null; VimServiceLocator locator = new VimServiceLocator(); locator.setMaintainSession(true); if(connection != null){ System.out.println("Connected successfully to vCenter."); service = connection.getService(); …

Member Avatar for NormR1
0
455
Member Avatar for Steven7

Hey guys, I am new to Java and recently developed a small GUI-based project in Windows using Netbeans IDE. So I try build the project and retrieve the .jar file and it runs well on my Windows computer. Then I copy the .jar file to a Ubuntu Linux computer and …

Member Avatar for JamesCherrill
0
175
Member Avatar for ad_rulz

Dear All, I have a tar file which contains .Z files. File Structure is : x.tar -> [1.Z, 2.Z]. I need to read data from this zip files. So far I have reached a stage where I read entry from tar but am not able to unzip files within the …

Member Avatar for StephNicolaou
0
2K
Member Avatar for ali11

Note: C:\Users\Hamza\Desktop\Graph.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Tool completed successfully [CODE]import java.io.InputStream; import java.net.URL; import java.util.*; import java.awt.*; import java.applet.Applet; class Node { double x; double y; int lane; int road; double dx; double dy; String lbl; int carW; int carL; double carWaiting; …

Member Avatar for JamesCherrill
0
150
Member Avatar for Dean_Grobler

Hi there, Last night I switched to Ubuntu 10.04 (no, not 10.10, long story). And I wanted to get started programming as soon as possible, so I'm trying to find out how to install Eclipse Helios and the Java JDK 1.6 on my machine? Please note that [B]my machine is …

Member Avatar for newpaulman
0
349
Member Avatar for karthik.datt

hi, Can any one help me in parsing a file using java. for example in my text file i have data like line.long 0x0 "MIDR,Identity Code" so i need to read this from a file and print it as command=line type=long offset=0x0 description=MIDR,Identity code There are around 100's of lines …

Member Avatar for stultuske
0
111
Member Avatar for irock_4you

Vince Travis Sillhouette Angeles Create a myMath class that contains the ff procedures and or methods 1. Add any number of numbers 2. Multiply any number of numbers 3. Raise a number to the nth power 4. Slope of a line given 2 points 5. Factors of a whole number …

Member Avatar for v3ga
0
117
Member Avatar for gispe

Hi! Im doing a program in java that gets info from a database.. thing is that im seting a variable with data from one table, and one data is char and cant find the way to have the .getChar() like the rs.getString() the code is: [code=java] public ModosDeCompra_clase dameModoCompra(Integer id) …

Member Avatar for DavidKroukamp
0
3K
Member Avatar for DavidKroukamp

hi everyone, I am writing a small client and server application in java which uses SSL sockets and AES, i got this from the net and edited it a bit is this correct and secure? client: [code=java]/* * To change this template, choose Tools | Templates * and open the …

Member Avatar for DavidKroukamp
1
203
Member Avatar for Albion1

how can i drow a graphic in java like the figure in the link below [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=23269&stc=1&d=1324131212"]http://www.daniweb.com/forums/attachment.php?attachmentid=23269&stc=1&d=1324131212[/URL]

Member Avatar for Albion1
0
110
Member Avatar for gourav1

[CODE]import java.io.*; class file3 { public static void main(String args[]) throws IOException { FileInputStream f1; int i; FileOutputStream f2; try { f1= new FileInputStream(args[0]); }catch(Exception e) { } try { f2= new FileOutputStream(args[1]); }catch(Exception e) { } try{ do { i=f1.read(); if(i!=-1) f2.write(i); }while(i!=-1); }catch(Exception e){}; do { i=f1.read(); System.out.print((char)i); …

Member Avatar for gourav1
0
146
Member Avatar for gourav1

[code]import java.io.*; class file2 { public static void main(String args[]) throws IOException { int b; b='A'; System.out.write(b); System.out.write('\n'); } }[/code] will anyone can tell that when i don't write System.out.write('\n'); then nothing comes in output. but after adding this statement 'A' got printed, why is it so ? secondly, i …

Member Avatar for JamesCherrill
0
96
Member Avatar for gourav1

once a thread enters any sychorinsed method on an instance , no other thread can enter any other synchronised method on the same instance ? what does this line mean ? also, how can one method be called by many threads at the same time on the same object ? …

Member Avatar for NormR1
0
159
Member Avatar for 03hasnam

[B]guys please help me with this. my problem is that on PaymentNewGUI class i am finding it hard to extract the entrance time from the file to be displayed on the gui if correct ticket number is added, reference to enterListener method in paymentnewGUI class thank you[/B] [CODE]import java.awt.*; import …

Member Avatar for 03hasnam
0
172
Member Avatar for creative_m

Hi I want to store variables in a text file (not as an object).my problem is that the class contains ArrayList of another type ,and I wrote one method to store the member variables of my class in "file.txt" ,but I don't really know how to write the ArrayList variable …

Member Avatar for creative_m
0
120
Member Avatar for pro_learner

Guys,i have developed a Java Application.I have already connected it with MySql DB & it's working properly.In DB there is a table calls Music and in that table contains a field calls Song _Path.It includes the path of the song in my computer.In java application there is a "Play" button.After …

Member Avatar for pro_learner
0
1K
Member Avatar for chinee

trying to connect a product class to the main class but i am getting errors i don't understand.like C:\Users\Juanelle\Documents\OOP Final Project\Order Process.java:36: cannot find symbol symbol constructor Product(java.lang.String,double) location: class Product Product product1 = new Product("Roses", 50.00); and in the error message the arrow is pointing at the n in …

Member Avatar for zeroliken
0
342
Member Avatar for abvd

Hi all I have an assigment but I'm stuck on the loop. I've checked other threads here but got a lot of complicated code that I haven't study yet (i.e.: "System . out .print" is still Screen . message("a") for me) So I have 6 lotto numbers 1,2,3,4,5 And I …

Member Avatar for abvd
0
970
Member Avatar for hszforu

HI!! I would like to know some of the alternatives for java swing. I have to create some kind of multithreaded bots for multiple account creations,Scraping etc. using proxies.Although i would like to ask is Java capable of handling this type of bots,because i have read over the internet that …

Member Avatar for hszforu
0
159
Member Avatar for DavidKroukamp

Why is there so many questions in this forum on really simple gui problems that can easly be solved by using an IDE such as netbeans and creating the gui from there .... I mean thats what is there for why still use the old way? beacuse you like to …

Member Avatar for stultuske
0
117
Member Avatar for Joey_Brown

Hello; Well, I need to create a program that randomly inserts new different sized spheres into a swing panel and animates them [movement is delimited by the width and height of the frame - when they collide with the frame they bounce to a random direction]. How could I accomplish …

Member Avatar for JamesCherrill
0
110
Member Avatar for 03hasnam

WHY DO I GET ERRORS FOR loadTicket MEthod saying incompatiable type, please someone tell me whats wrong and tell me the correction for it? import java.util.Date; import java.lang.*; import java.io.*; import java.util.Calendar; public class Ticket { public TicketInfo x; public int tNumber; public static long entranceTime; public static long paymentTime; …

Member Avatar for stultuske
0
285
Member Avatar for rotten69

Hey everyone, I'm just wondering what level and type of maths are needed in solving programming problems. I was looking at maths courses the other day but I was unsure which one would suit my need as I'm an IT guy. Can anyone suggest something? I want to be able …

Member Avatar for bibiki
0
212
Member Avatar for gourav1

[CODE]class thr2 { public static void main(String args[]) { A a = new A("first","hello1"); A a1= new A("second","hello2"); try{ a.t.join(); a1.t.join(); }catch(Exception e) { } } } class A implements Runnable { Thread t; String str; B b = new B(); A(String name,String str) { t=new Thread(this,name); t.setName(name); this.str=str; t.start(); …

Member Avatar for zeroliken
0
162

The End.