32,204 Topics

Member Avatar for
Member Avatar for johny08z378

lets say we have a string String ss="file1"; now i want to create a variable (a file variable) and i want its name to be file1 which is the content of the string ss.

Member Avatar for NormR1
0
111
Member Avatar for muraj

Hi all. I could really use some help on adding a node to the end of a doubly linked list. First off here is my node class along with the class where the adding should take place. For simplicity I did not add the other parts and classes of the …

Member Avatar for NormR1
0
412
Member Avatar for dav555

I would like to implement an error reporting mechanism into my application: If an error happens the user should be able to directly send me this error message. I thought of doing this with JavaMail. My question is now: to send an email I have to authenticate on an SMTP-Server. …

Member Avatar for stultuske
0
141
Member Avatar for leo88

Hi, I wants to ask about how to call the javascript function/method in .aspx file from code behind(or server code)? for example: Javascript: [CODE] function initCard(userid) { //userid, balance, subsidy breakfast, subsidy lunch, subsidy dinner var iRet = winCtrl.initCard(userid, 0, 0, 0, 0); } [/CODE] code behind: [CODE] Dim sb …

Member Avatar for G_Waddell
0
415
Member Avatar for BeginningJava

i'm trying to create a program that asks the user to input a file (but the file name is standard name that will not change) and input a specific character. The program will use looping to find how many of that specific character is in the .txt file. This is …

Member Avatar for stultuske
0
366
Member Avatar for herious89

Hi Im writing a beginner program that computes the value of Pi ( pi/4 = 1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 +... ). I've done this one, but now I want to find out how many terms do i have to use beofre i first …

Member Avatar for zeroliken
0
208
Member Avatar for woodenduck

Started this thread in the python area but seeing as Jython is a fusion of java and python I thought I'd post a link here in case someone can help [URL="http://www.daniweb.com/forums/showthread.php?t=415593"]http://www.daniweb.com/forums/showthread.php?t=415593[/URL]

0
83
Member Avatar for woodenduck

Hey all I need some help with Jython. In Python I'm given the easy option to read a file with [CODE]file = open('/dev/input/js0')[/CODE] Then I can put it into a non blocking mode with something similar to [CODE] import os, fcntl file = os.open('/dev/input/js0', os.O_NONBLOCK) [/CODE] But in Jython I'm …

0
218
Member Avatar for mags11

Hi all. I'm having trouble with this simple Java program. When I compile it, numerous errors would happen. I put in let's say 50 miles for the speed of the car and 2 hours for the traveling hours. I run it and it you see this: Hours Distance Traveled --------------------------------- …

Member Avatar for mags11
0
2K
Member Avatar for MichaelCJ10

I have created a program to display salarys, calculate a bonus payment and display total. Wages and total are my two arrays. My problem is, when i run the program, my element starts at 0.i need it to start at one but it cant skip the first value in my …

Member Avatar for MichaelCJ10
0
912
Member Avatar for Murphyv10

hello all just need help with compiling public class Passenger { //instance variables private String name; private String address; private String emailAddress; private Flight flightBooked;// will hol the adress of the flight object //constructors public Passenger() { this.name = " "; this.address = " "; this.emailAddress = " "; this.flightBooked …

Member Avatar for MichaelCJ10
0
98
Member Avatar for adil_bashir

hello everyone, help me in centering the frame which i developed using swing. Here is the code: [CODE] import javax.swing.*; public class RSAInterface extends JFrame { public RSAInterface() { setTitle("RSA by adil"); setBounds(200,200,300,300); setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new RSAPanel(); this.add(panel); } } [/CODE] [CODE] import javax.swing.*; public class RSAInterfaceTest …

Member Avatar for Hazem Nassr
0
125
Member Avatar for sheushen

Hi, is there any way to return the array from the Checkgpa class back into the Gpa class for an output? I am still new in this topic. [CODE]public class Gpa { private String name; private char result; private double gradep; private int num, sem, ch; public Gpa (String na, …

Member Avatar for stultuske
0
211
Member Avatar for lena1990

hi i work on project in java and i use tcp and after that i almost finish the project then i have to create an applet and the applet doesnot work with tcp so what can i do i need any help?

Member Avatar for NormR1
0
101
Member Avatar for aliasadsahu

Sir I want to show certain cities only in some container in java desktop application. Which is the best way to do so thanks.

Member Avatar for peter_budo
0
71
Member Avatar for tleverington1

I'm having some problems when trying to set a panel within my JFrame to visible when someone either presses enter or clicks the JButton within my two methods shown in previous post. I am getting the following error: Cannot make a static reference to the non-static field Interface.panel. The code …

Member Avatar for tleverington1
0
2K
Member Avatar for NealCaffrey

I m trying to select data from a drop down and retrieve & display the values corresponding to it into textboxes.. the data to be displayed into the textboxes is taken from database(mysql database).. The scripting is done in JSP which is as follows: issue_from.jsp [code] function showDataIssue(){ xmlHttp=GetXmlHttpObject() var …

0
86
Member Avatar for coolbeanbob

Is this a real class? I am working through a Deitel book, and they use it, but my program does not recognize it. I am importing the same libraries as the example in the book.

Member Avatar for pdeitel
0
235
Member Avatar for sanidon

hello m new here starting java can anyone guide me how ti initilize array of objects in java em receving java.lang.NULL pointer exception ` choice=Integer.parseInt(JOptionPane.showInputDialog(null,"Enter choice"));` Patient pati[]=new Patient[49]; if(choice == 1) { pati[i].setdata(); pati[i].showdata(); count++; } if(choice== 2) { pati[count].update(); pati[count].showup(); } }while(choice!=3); }

Member Avatar for richieking
0
201
Member Avatar for wallet123

hi hello! im planning to do a payroll system for our defense project,im a beginner and i want our program to be more complicated in a way that we can still be able to explain it. I want our program to be able to have multiple input boxes, because the …

Member Avatar for wallet123
0
118
Member Avatar for konstantina

Hello all, I'm trying to insert a new node using xpath. This is easy to do, but when i'm trying to add attributes to that node I get an exception. Here is my code: [CODE]reservationExpression = xpath.compile("/hotels/hotel/room[@id='" + roomId + "']"); Node room = (Node) reservationExpression.evaluate(doc, XPathConstants.NODE); Node reservation =(Node) …

0
28
Member Avatar for javalover

Hi frnds!!!!!! Am trying to crop an image using java.. If I draw a rectangle on the image it ll crop the image in the given level.. My code does it but the fact is, it is not cropping the actual part which we selected..This is my code.. [CODE] import …

Member Avatar for javalover
0
2K
Member Avatar for nickliutw

I'm working on a Palindrome program. For some reason, my compare method always return zero. "c" should suppose to increment 1 when both letter are the same, but my method would not increment 1 when the letter are the same for some reason. I'm not sure where is the problem. …

Member Avatar for nickliutw
0
161
Member Avatar for CzechRock3

So here is the deal, I can not use Java. I went to touch up on my Java Programming Skills, so I could help out a few of my University friends with programming... And guess what. I can't use Java. Now I have been dealing with this issue for about …

Member Avatar for RTFMID10T
0
150
Member Avatar for mjselkirk

I have been given a project to create the interface and code for a ticket seat calculator I have to produce the quantity and price which is from a text box on the main frame pass them into the seat class to create the totals then pass it into a …

Member Avatar for NormR1
0
155
Member Avatar for codemonster

Ok - so I have an object "A" that has a value (for the sake of example here, it's initialized to 0). I'm making a GUI and I've created a panel that is supposed to display the amount from object "A" in a label which shows up on the screen. …

Member Avatar for codemonster
0
212
Member Avatar for coolbeanbob

Hello, I am trying to work through an example from a Deitel book. I keep getting a "source not found" error on line 27 of the LabelFrame class. I have put the "bug1.png" in every single directory associated with this project. I am stumped... [CODE] import java.awt.FlowLayout; import javax.swing.JFrame; import …

Member Avatar for coolbeanbob
0
184
Member Avatar for Sommy

Hello, I'm writing a small game for a class. The problem is when i run it it starts consuming the computers resources, i bet i've done something very wrong but i just can't find it (haven't even added bouncing back from the paddle to the code, or game over for …

Member Avatar for NormR1
0
277
Member Avatar for roshan_iiita

I am developing a Interactive Spoken Dialogue System, in which user will say something to the system and system will answer him in voice and generating facial expressions according to the voice. But, i can't get any idea that how can i generate facial expressions. Will anybody tell me that …

Member Avatar for richieking
0
155
Member Avatar for turt2live

Hello, I'm working on an application that uses a ServerSocket, but it (at points) stops the server thread and restarts it, throwing a java.net.BindException: address already in use exception. How can I unbind the ServerSocket (.close() is not working to unbind) so I can re-use the same port seconds later? …

Member Avatar for richieking
0
638

The End.