32,199 Topics
| |
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 … | |
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] | |
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 … | |
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 --------------------------------- … | |
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 … | |
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 … | |
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 … | |
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, … | |
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? | |
Sir I want to show certain cities only in some container in java desktop application. Which is the best way to do so thanks. | |
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 … | |
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 … | |
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. | |
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); } | |
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 … | |
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) … | |
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 … | |
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. … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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? … | |
in Attached Files there is Question i do not understand the last step how to coount it ? [CODE]package javaapplication178; public class JavaApplication178 { public static void main(String[] args) { int x[][]={{14,7,5,0}, {9,20,25,12}, {25,25,40,30}}; for(int i=0;i<x.length;i++) { for(int y=0;y<x[i].length;y++) { System.out.print(x[i][y] + " "); } System.out.println(" "); } PrintStock( x); … | |
Hi, i am beginner in java. I doing my final year project in Java Swing. So far, somehow through some online tutorials and articles, i learned to finish 30$ of my project. Now, i need to know how to insert the data from my database into Jtable and display it.... … | |
I need to just make the column headers invisible in JTables, as i need to create a matrix. How can I do that? | |
now I try to develop the tcp chat server So what I have done so far -my server can only received string from the client -My server can show the total of the connection So what I want to ask what do I need to do to make the server … | |
hello, is there any function in java that can give me 2^n binary combinations. as an example, if the value of n = 2, output should be: 00, 01, 10, 11 ?? |
The End.