32,204 Topics

Member Avatar for
Member Avatar for dmanw100

Hello, I am having problems using an ObjectInputStream to read from a file. My program uses a File to check whether or not a specific file exists. If it exists my program will attempt to create a FileInputStream for the file and associate an ObjectInputStream with it. It should first …

Member Avatar for dmanw100
0
119
Member Avatar for f.damati

HI I am working on a java application using netbeans, I face a porblem. I want to display the output of my program, on jtextarea (i have designed a jtextarea,) just I want to display the output namely the content of an array. plz can anyone help?

Member Avatar for javaAddict
0
173
Member Avatar for b1k1m1

I am using following method to convert string to calendar date '2007-05-10T08:10:21-8:00' . The code is as under public Calendar dateStringCalendar(String s){ Calendar cal=Calendar.getInstance(); try{ SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); Date d1=df.parse(s); cal.setTime(d1); return cal; }catch(Exception e){ } return cal; } when I get response back to my jsp page it shows …

Member Avatar for b1k1m1
0
120
Member Avatar for dep.new

hello, please tell me a function which can transform the first 100 consecutive number into a string? i kept looking but i could'nt find one thank you all the best dep:)

Member Avatar for javaAddict
0
74
Member Avatar for joshmo

Iam using an AWT component. Did a little research but cannot find anyway I can make my player return a JComponent..tried this casting but Iam getting an exception at the line. [code=java]((com = (JComponent)p.getVisualComponent()) != null)[/code] I also got to see something about mixing SWING with AWT so I decided …

Member Avatar for joshmo
0
123
Member Avatar for jdbarry

Hi, I was in an online class where I had a teacher that was difficult to get hold of. So I posted here for clarification and help topics. Others are copying my postings and turning it in as their own. I am asking that you delete all of my postings. …

Member Avatar for ~s.o.s~
0
80
Member Avatar for suresure88

[B]EDIT:[/B] ok great now after some searching, i realise the get_UID is not the UID i want to find which is the user ID. But still, is there anyway to retrieve? [B][I]EDIT2:[/I][/B] OK, i think i'm being such a klutz right now. i think they are still the same? so …

0
63
Member Avatar for javacle

just need sum help for classpath settings for command line compiling of classes of new java packages. i've been trying to do it but it only works for one package.

Member Avatar for kvprajapati
0
91
Member Avatar for lardshow

i may already have asked a similar question to this but my brain is so fried with this problem. i have to read two csv files, entering the data contained into a map and a list. the first method readInTasks() works fine, reads the file and enters the data into …

Member Avatar for lardshow
0
146
Member Avatar for teshi

what can possibly be done to insert a time stamp and a date into oracle database using Java code

Member Avatar for masijade
0
29
Member Avatar for jamojo

Hello everyone, How can I convert this format using Java? 2009-05-20T18:19:23+08:00 I was able to convert this using the SQL Statement below. select cast('' as xml).value('xs:dateTime('2009-05-20T18:19:23+08:00')', 'datetime'); I would like to know how Java handle this format. Any suggestions are greatly appreciated. Thanks in advance, Jamojo

Member Avatar for masijade
0
159
Member Avatar for sneharaveendran

Hi all I need to read an Excel sheet using java and I need to know how many columns are there in that excel sheet. Please drop a code snippet to this thread

Member Avatar for jaka.ramdani
0
163
Member Avatar for brandongood

Hello, I am working on a java program that finds perfect numbers. I need to make it run more efficiently by touching up the computation I have in my factorSum method. Heres what I have so far: [CODE] public static int factorSum(int testNum) { //Initialize local variable accumulator to zero. …

Member Avatar for brandongood
0
189
Member Avatar for lyxus

Hello Guys, I am traversing a binary tree in java. I can print the whole tree whitout any problem. I do it this wat [code] private void printNode(String path) { if ((left==null) && (right==null)){ System.out.println("Val \"" + MyChar + "\" binary value " + path); } if (left != null) …

Member Avatar for BestJewSinceJC
0
63
Member Avatar for squinx22

Are there any chances that I could resize an image using the fileconnection inputstream? FileConnection fc = (FileConnection) Connector.open("file:///" + filePath + "/",Connector.READ); InputStream fis = (InputStream) fc.openInputStream(); I want to resize the image from here because if I use Image.createImage(fis); I am encountering "Out of Memory error", if the …

Member Avatar for kvprajapati
0
220
Member Avatar for sgsawant

When I tried to compile my HelloWorldApp.java file using the following command: javac HelloWorldApp.java it worked (for being able to do this simple thing I had to change a lot of variables). But then when I tried to Run the program using: java HelloWorldApp it gave me the error: Exception …

Member Avatar for sgsawant
0
388
Member Avatar for Truffy

Hi, I am writing a code that will get a file in the linux server(server.logs). Can anyone help me out with that. I am using a java se in a windows. and i dont knw how to retireve file on it. I need to log the files and parse the …

Member Avatar for Truffy
0
111
Member Avatar for Nperic

Just recently we were given an assignment. We had to construct a GUI which maps out tomtom(navigator) coordinates into google maps and linear graphs. For bonus marks a feature was to be able to change the language of the gui (english to spanish etc) Our tutor had instructed us that …

Member Avatar for jaka.ramdani
0
103
Member Avatar for joker21

Hi, i created a program but i need some help. I made it so the user must enter the ip address and then click the button CONNECT. But in java it outputs the same thing. Is there any way i can get rid of it and just start the program …

Member Avatar for joker21
0
214
Member Avatar for LegendaryXM90

I'm making a game for a project due this Tuesday. You're in a dungeon with rows and columns, and for each coordinate there is a cell and there are 3 trap cells that you instantly die from if you walk into them. Also, you die if you hit 3 walls. …

Member Avatar for LegendaryXM90
0
137
Member Avatar for lardshow

i've had a pretty good day today up to now.... i have a method calcFinalOCAS() which should take an average of a list, replace the lowest value (if its lower than the substitution score), do the average again. now this works but when its compiled and i run it but …

Member Avatar for lardshow
0
82
Member Avatar for kimbirdy09

Hello everyone, i have been trying to complete this program on a letting agency where a user gets a choice of options 1. Add a property 2. Remove a property 3. Display all properties 4. Exit the system I have no idea what syntax to use within each case option …

Member Avatar for Zibo
0
96
Member Avatar for caps_lock

[code] import java.io.*; import java.util.*; public class MainTwo { public static void main(String[] args) { for(File file : File.listRoots()){ search(file); } } public static void search(File f) { ArrayList<File> arrayList = new ArrayList<File>(); f.listFiles(); arrayList.add(f); System.out.println (f.getName()); } } [/code] Why does it print nothing?

Member Avatar for caps_lock
0
159
Member Avatar for Majestics

[code] import javax.swing.*; import java.awt.*; public class keyboard { public static void main(String args[]) { String s[] = {"esc","F1","F2","F3","F4","F5", "F6","F7","F8","F9","F10","F11","F12", "psc","slk","pau"}; JButton j[] = new JButton[s.length]; for(int i=0;i<s.length;i++) j[i].setText(s[i]); JFrame f = new JFrame(); for(int i=0;i<s.length;i++) f.add(j[i],JFrame.LEFT_ALIGNMENT); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); } } [/code] I need Instant Help!. Code is giving me …

Member Avatar for Majestics
0
109
Member Avatar for bryan69

hi guys.. i dont noe if this is the right place to post this but,im in need of an idea for a project related to security. can anyone suggest an idea? thanks~!

0
61
Member Avatar for tomata2

Problem Description: Multi automobile movement simulation in a multi lane road Consider a road (street) consisting of NL lanes with NC cars moving in one direction. Each car has to move in a certain lane with possibility of changing lanes. Each lane is divided into NP positions. Cars movement is …

Member Avatar for VernonDozier
0
102
Member Avatar for fuzzyrose

Hi all I want a help for changing this program to a linux program . Can anyone help me? wether is it in c++ or Java. [code=java] import javax.swing.*; import java.awt.*; import java.awt.event.*; class fcfs extends JFrame implements ActionListener { JButton jb[] = new JButton[3]; JTextField jt1[],jt2[]; JLabel jl[],jl1,jl2,jl3; JPanel …

Member Avatar for kvprajapati
0
235
Member Avatar for Ghost

Hi everybody; is there a way to find system info (current time, date, processor speed, processor's RPM, Fan1's RPM, Fan2's RPM, etc)? I am making a program that gives you information about your computer. Thanx in advanced, C++

Member Avatar for jaka.ramdani
0
1K
Member Avatar for Kishorey

can anyone help me in creating gadgets ...I need to know how to make a gadget ... also wat languages are used for making a gadget... i ve googled a lot bt cant find any solutions .... so help me ...

Member Avatar for Kishorey
0
125
Member Avatar for lardshow

hello all i am now about ready to pull my hair out and/or possibly worse! i have to read a .csv file, split the 3 elements into variables and then put two of the variables into a map. i can read the file fine, i can display the variables in …

Member Avatar for lardshow
0
98

The End.