35,618 Topics

Member Avatar for
Member Avatar for Dan Bois

Hello. I am just starting java and I was woundering if anyone could help me with 2 things. I was woundering how to put my program into a loop so it just keeps going and how to make the circles transparent. Here is the program. Thank you very much if …

Member Avatar for shaun.husain
0
133
Member Avatar for hpdv2000

Hi all, Im having trouble understanding the two sorting method. How do you find the number of comparison made by merge sort and quicksort? isit using the O(nlogn)?? What is it supposed to mean by " sort, by hand, the folllowing array... using a)merge sort b)quicksort Thanks

Member Avatar for mahlerfive
0
68
Member Avatar for Sereal_Killer

i'm a realy newbie stil only been taking this course for a few months. i have a problem with 2 things in the folowing codes and im gona ask ure help with them . they are semi english since im in europe and these are codes the teachers used as …

Member Avatar for VernonDozier
0
125
Member Avatar for efus

I have a binary tree which I would like to get printed out inorder. Right now I have this recursice loop: [code] public void inorder() { if(leftChild != null ) leftChild.inorder(); System.out.print(" " + data); if(rightChild != null ) rightChild.inorder(); } [/code] This get the right order printed. The problem …

Member Avatar for quuba
0
101
Member Avatar for littlebean21289

hi so i have just joined today but if i had known about this site i would have joined much sooner, i asked if anyone could help me with how i should post in the intro but dont wanna wait a day for a response so if i make any …

Member Avatar for littlebean21289
0
772
Member Avatar for deepu16

can any1 suggest me how many modules should b desinged to develope a file splitter sw n wat shuld b they???

Member Avatar for quuba
0
36
Member Avatar for artirt

I'm making a web site and need limiting customers' access to the website of my application. I work under Apache Tomcat 6.0.18, postresql and of course i've put postgresql-8.3-603.jdbc4 in my lib file. My context Apache-Tomcat's name is "hotel", and my database's name is AMDB. I haven't a file sun-web.xml …

0
90
Member Avatar for vladdy191

I'm trying to make a symbol table, for a project. The project as a whole is a translator/compiler that translates an imaginary language into java. I have everything down except for the symbol table. I am currently using a Stack of Lists. The Lists are vectors of Strings so I …

Member Avatar for ~s.o.s~
0
122
Member Avatar for pocku

I am trying to create a heap sort method using recursion but whenever one of my methods called maxHeapify is called, it would throw a StackOverflowError. I understand that this error will pop up whenever my application recurses too deeply but the problem is I don't see anything wrong with …

Member Avatar for pocku
0
118
Member Avatar for AcesWild160

Hello and Happy holidays to all. I am new here, so sorry to bother you. I'm working on a project for a class and have run into a bit of a snag. I have a method that reads integer values from a text file and stores them into an array …

Member Avatar for BestJewSinceJC
0
111
Member Avatar for ebiz

I have a button which opens up the file chooser. When a txt file is selected a Jframe appears with the data in. How do I change this, so the data displays in a JTable? Here is my current code package org.project; import java.util.*; import java.io.*; import javax.swing.*; public class …

Member Avatar for quuba
0
207
Member Avatar for l_03

can someone help me how to make attempts in pin numbers...for like example,,if the user input three times of a wrong pin number,,then the program will exit..help me..this is not really my whole code... if (pinNum2== bank.arrAccount[2][0][0]){ String w = JOptionPane.showInputDialog("How much you want to withdraw?"); int withdrawAmount =Integer.parseInt(w); bank.withdrawCash(withdrawAmount); …

Member Avatar for peter_budo
0
102
Member Avatar for StephNicolaou

Hi all, Background: I am dealing with graphical objects on a canvas in which the user draws four lines and out of these four lines I get the top left corner, bottom right corner and figure out the width and height from these two points. Problem: I have completed this …

Member Avatar for peter_budo
0
122
Member Avatar for christiangirl

Hello, I had to make this program and it is all working except it is not writting to the file. Can you help me out? Here is the code: [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; /** * Program that allows user to select a meal. * Includes …

Member Avatar for christiangirl
0
137
Member Avatar for Enjoy

Hi all, I want to retrieve selected item from listbox in a jsp page and send it to a servlet. I am not able to get selected value. Can u please tell me how to get selected value. In servlet i am trying to get the selected value by using …

Member Avatar for stephen84s
0
537
Member Avatar for c_skyscraper

Hi guys, This is me, novice programmer to Java. i have a very simple question. can i change Font of a Label? for example i have a label: Label l1 = new Label("Welcome To Java"); now what i want is to be able to change the text(Welcome to Java) to …

Member Avatar for c_skyscraper
0
95
Member Avatar for Grub

Hi, I am writting code for a Jtable. Now in this Jtable I list file files based on different attributes, including CRC Hash. Now I have a table that has 6 columns. the data Model extends the Abstract data Model. In my data Model I have two particular methods for …

Member Avatar for quuba
0
184
Member Avatar for efus

Hi. I am working on a project where I convert postfix notation to infix and evaluateing it. This includes building an evaluations tree (binary tree). I get how to create nodes, but how do I get the whole tree? This is the code I have so far: [code=java] import java.util.*; …

Member Avatar for quuba
0
112
Member Avatar for nanna

Hi, I need to show stars equal to the each number of an array. I think I need another for statement. I`ve tried, but in vain. I do not know which variables should be included in this for statement ?? the output should be : 0|****(4) 1|**(2) 2|*********(9) and so …

Member Avatar for nanna
0
1K
Member Avatar for ebiz

Hi. I currently have set up a GUI to have buttons on, linking to all my other classes. I am wondering how I would put the date and time at the bottom of the JFrame/JPanel. How would I do this, and will I put it within my GUI class, or …

Member Avatar for peter_budo
0
3K
Member Avatar for nouryn
Member Avatar for Ezzaral
0
164
Member Avatar for ebiz

I currently have an Oracle database, a Java Program, and a text file. Text files are being read by the system, which automatically updates the database. How would I make a JTable to make the database be displayed nicely in a JFrame?

Member Avatar for peter_budo
0
153
Member Avatar for jackieblock

I am working on a program to calculate mileage, fuel cost, and travel time when the user selects a vehicle from a combo box. It works well when reading from an array that I put in the program. But now I have to have it read the starting figures from …

Member Avatar for ~s.o.s~
0
153
Member Avatar for sm3128
Member Avatar for Arald

Hi, I have a trouble: I want to send text from my laptop to Nokia N95 using bluetooth tecnology. This is my source: [code=java] ClientSession clientSession = (ClientSession) Connector.open(serverURL); [b]HeaderSet hsConnectReply = clientSession.connect(null);[/b] if (hsConnectReply.getResponseCode() != ResponseCodes.OBEX_HTTP_OK) { System.out.println("Failed to connect"); return; } HeaderSet hsOperation = clientSession.createHeaderSet(); hsOperation.setHeader(HeaderSet.NAME, "Hello.txt"); hsOperation.setHeader(HeaderSet.TYPE, …

Member Avatar for wad
0
158
Member Avatar for wad

hello [CODE]os=sc.openOutputStream(); os.write("hello".getBytes()); os.close(); sc.close(); [/CODE] i used these to send message form mobile to pc but it not work from pc to phone [COLOR="Red"]i used BlueCove version 2.0.3 on winsock [/COLOR] TNX

0
83
Member Avatar for babusek

Hi Frnds, Sorry For The Spam . i have a class name"Super" program:[code] package turn; public class Super { public static String platformFlag=null; public void parse() { platformFlag="Sekhar"; } public static void main(String args[]) { Super ob=new Super(); ob.parse(); } } ------------------------------------------------------------------------------- Now i have another class in the same …

Member Avatar for stephen84s
0
147
Member Avatar for bufo

Hi, I am developing a Java application that uses a serial port to communicate. The communication part is working fine but if I close the serialport using the close method on the SerialPort object and then try to open it again using the open method on a CommPortIdentifier object I …

Member Avatar for ~s.o.s~
0
878
Member Avatar for nefashu2

I need to write a code that takes 5 students and takes a grade for each of them, using two quizzes (10 points each), one midterm (50 points) and one final (100 points), and then gives final grade. It has to use an array. I tried to do this code …

Member Avatar for verruckt24
0
80
Member Avatar for leki

I try using this code: [code]File wd = new File("/sx04a1/jakarta-tomcat-5/webapps/maltixa"); String sscp = "scp /sx04a1/jakarta-tomcat-5/webapps/maltixa/index.jsp [email]jipbekok@fff04.ff.ff.es:/sx04a1/jakarta-tomcat-5/webapps/maltixa/index5.jsp[/email]"; p = Runtime.getRuntime().exec(sscp,null,wd); try { p.waitFor(); } catch (InterruptedException e) { e.printStackTrace(); } out.println("Exit value: " + p.exitValue()); BufferedReader reader =new BufferedReader(new InputStreamReader(p.getInputStream())); String s = reader.readLine(); out.println("scp said [ " + s + …

Member Avatar for leki
0
160

The End.