31,001 Topics

Member Avatar for
Member Avatar for djdanjo82

Hi All! First thanks for viewing my thread. I have spent a half day and change trying to find a solution to this specific problem. Basically I am trying to figure out how to change the variable name while in a loop. The last loop is where my problem is …

Member Avatar for kvprajapati
0
4K
Member Avatar for aries_87
Member Avatar for kvprajapati
0
33
Member Avatar for chan95

Hi everybody, while i build my ant scripts in eclipse, and at the stage of [INDENT][/INDENT][B][exec] Invoking RMIC. [/B]i get an error complaining of some classes not being present. but where as they do exist in my project. Does anybody have any clue of why this happens Thanks in advance.

Member Avatar for chan95
0
75
Member Avatar for grisha83

Hello, I wrote an add method but for some reason it does not add more than 3 values. Could anyone tell me why? here is my method: [ICODE] public void addValue(int value) { IntNode cur = head; IntNode prev = cur; IntNode t = new IntNode(value); if (value <= cur.data){ …

Member Avatar for grisha83
0
64
Member Avatar for kashn

Hi, I'm using a JTextArea in a JApplet, and having difficulty trying to align the JTextArea on the x, y axis... I've tries setBounds, setAlignmentX & setLocation... Neither seem to work. Plz help! This is what I have: [ICODE] public class Testing () { JTextArea TxtArea; Container Panel; LayoutManager Layout; …

Member Avatar for kashn
0
131
Member Avatar for JamesCherrill

Suns Java style rules specify that accessors should follow the getX/setX pattern, and most Java API mathods follow this... except for some very common exceptions such as: String length() enum name() [NB new to 1.5, not a legacy!] ArrayList size() etc It seems that there is another pattern operating here: …

Member Avatar for JamesCherrill
0
155
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
119
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
79
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
62
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
144
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
28
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
162
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
188
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
110
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
213
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
127
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
92
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
108

The End.