36,051 Topics

Member Avatar for
Member Avatar for ghaith

Hey, I'm working on a project where i have to visualize an algorithm, i have to generate graphs in the application, and it must be using Gxl, i searched for manuals on gxl and java, i found jgraph, but I'm actually not sure where to start on that, let's say …

0
67
Member Avatar for milgo

hi,im new in java & i really dont have the basic concepts of object oriented programming.please help me with the code for application class that automatically rejects anyone above the age of 40.kindly include comments so that i can understand better.thanks

Member Avatar for Ezzaral
-1
123
Member Avatar for BrianK123

This is probably just a stupid mistake but I can't figure it out. I have this code: [CODE]TextField passGet=new TextField(10); passGet.setEchoChar('*');[/CODE] and when I try to compile, I get and <identifier> expected error. Anyone know why?

Member Avatar for BrianK123
0
1K
Member Avatar for Chaster

Yellow, From my application - for some reason - I am able to send messages up to only 64k. I've been wondering if it is possible to split an InputStream into partitions of 64k, and then, on client side to join them again. Is this possible? Have you ever done …

Member Avatar for BestJewSinceJC
0
84
Member Avatar for Johannady2

number = 10; sum = 0; for (var i=1; i<= number; i++) { sum = sum + number; } document.write("sum = " + sum); number = 10; for (var i=number; i > 0; i--) { if ( i%2 == 1) document.write(i); } product = 1; number = 5; for (var …

Member Avatar for verruckt24
0
118
Member Avatar for viber101

hi I would like to know if it is possible to display the line number in a JTextArea? I design an editor using NB ide and I'd like to offer the same features like Text Editor that show the number of EACH line at the left side of the text. …

Member Avatar for Ezzaral
0
64
Member Avatar for BrianK123

I was writing an applet before and was displaying information in a JOptionPane. Useing \n, I was able to make the information display multilined like this: [CODE]Name1 Grade1 Name2 Grade2 etc.[/CODE] I unfortunately had to change my code from an applet to a JFrame and subsiquently my Labels to JLabels. …

Member Avatar for BrianK123
0
193
Member Avatar for mona515

I've been tryin to figure out how to pick numbers from the 'choices array' and put then into the results array. Can any body help me. I was thinking of adding a for loop but not sure. The code i got so far is below. import java.util.Random; import java.util.ArrayList; public …

Member Avatar for notuserfriendly
0
84
Member Avatar for gpittingale

I have called some numbers from a mysql database, they come out like this: [CODE]${parish.TotalHouseholds}[/CODE] Now what i would like to do is take the TotalHouseholds and TIMES it by 21.33% and display the answer in a separate cell and i was wondering if anybody could give me a plain …

Member Avatar for gpittingale
0
79
Member Avatar for prasanna_godugu

Hi All In my application attachments will store as BLOB in the database, when a person receive the mail how to view the attachment with out download it just like yahoo mail there are 2 links 1) View Attachment , 2) Download Attachment, i want similar functionality please some body …

Member Avatar for crunchie
0
90
Member Avatar for kirti19tanwar
Member Avatar for surya_anand00

hi, I want to call the .jrxml while which is jasper report file from the jsp. also i want to know how the pass runtime query to the report file.

0
61
Member Avatar for shahab.burki

Hi, Can we declare Char Array in Java instead of String Arrays? So we can manipulate them? or we have to use Strings and then use charAt() method for it? Thanks

Member Avatar for stultuske
0
145
Member Avatar for k2k

hi, i actually had done similar programs many times and don't know why eclipse gave me strange output this time. anything possibly wrong? thanks [code] class RobotShop { public static void main(String[] args) { try { Scanner reader = new Scanner(new File("air.txt")); String robotName = null; String serial = null; …

Member Avatar for stephen84s
0
115
Member Avatar for aodpreacher

Hi i have a java class called City and in this class i have this. [CODE] public class City { /** * read the file and make 10 objects * */ private String name; private double population; public City(String name, double population) { super(); this.name = name; this.population = population; …

Member Avatar for BestJewSinceJC
0
137
Member Avatar for transplantedNYr

So I am going through the "Getting Started Using Java RMI" and I get stuck at the following spot... [CODE] [B]javac[/B] -d [U]destDir[/U] Hello.java Server.java Client.java [/CODE] I use... [CODE] [B]C:\"Program Files"\Java\jdk1.6.0_11\bin\javac [/B] -d [U]C:\"Documents and Settings"\"Andrew Carrara"\Desktop\test\mysrc\example.hello[/U] Hello.java Server.java Client.java [/CODE] I get an invalid flag error. What exactly …

Member Avatar for transplantedNYr
0
135
Member Avatar for Andrewsc1

Im new to java and just trying to figure out the basics. i cannot figure out what is wrong with my program. Any suggestions on whats wrong? [code]4import java.util.Scanner; 5 6public class Lottery 7{ 8 public static void main(String[] args) 9 { 10 //Generate random lottery numbers 11 int lottery …

Member Avatar for Andrewsc1
0
143
Member Avatar for youngstorm

Hi, I have an int method that checks an array for a certain number. If that number is NOT found I won't to 'return null;'. I get this error "incompatible types" "found : <nulltype>" "required: int" How can I resolve this? thank you, Michael

Member Avatar for youngstorm
0
126
Member Avatar for scott_rider

Is there a method I can grab parent/grandparent nodes? The examples I have found appear to use only xpath statements to select nodes. Some of my failed attempts: /table/tr/td/b/font[self::text()="Nohup Files"] /table/descendant::font[self::text()="Nohup Files"] <table> <tr> <td><b><font>Nohup Files</font></b></td> </tr> </table>

Member Avatar for Ezzaral
0
103
Member Avatar for Y2K_MASTER

Hey guys, I'm making a program that takes 3 sets of coordinates from a user to make a triangle. It then calculates the length of each side, the perimeter of the triangle, the area of the triangle, and the 3 angles. I have it all coded, except for the area …

Member Avatar for Y2K_MASTER
0
158
Member Avatar for gpittingale

Hi everybody, i am new to java and trying to develop a bit of an app i have created the first page, dynamicall filled a dropdown box all is fine i press the submit button and i get the error below: java.sql.SQLException: Parameter index out of range (1 > number …

Member Avatar for gpittingale
0
168
Member Avatar for elangobala

Hi i m developing jsp application. In my system the screen resolution s 1024*768 pixels.It will shows the web page properly.While viewing the same page in my friends room his system resolution s 800*600 pixels it will be of in different form of shape and nature.How to make the page …

Member Avatar for peter_budo
0
119
Member Avatar for jpp10

I have the following code, which reads from the .csv file and simply displays the output as whatever is being read from the .csv file...(which is test1.csv in the test1.zip attached with this post) //class to read CSV file : import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException; public class readCSV { …

Member Avatar for jpp10
0
182
Member Avatar for l_03

[ICODE] import javax.swing.*; public class Tokenize{ public static String s[] = new String[100]; public static void main (String args[]){ String ask = JOptionPane.showInputDialog("Enter:"); isAsk(ask); } public static void isAsk(String ask){ StringTokenizer st = new StringTokenizer(ask," ",false); int input = Integer.parseInt(st.nextToken()); if(input<=10&&input>=0){ System.out.println(input); } } } [/ICODE] Here is the sample: …

Member Avatar for verruckt24
0
170
Member Avatar for janakavishwajit

Hi alll............. Please can someone help me to find a way to call for a c# function from a javascript which is in the web page of web browser included in a windows application....... Urgently need....... Please............!!!!!!!!!

Member Avatar for janakavishwajit
-1
91
Member Avatar for guatemalagirl

the purpose of my program is to ask the user for their numerical grades (depending on how many total grades they have) and then they are given their letter grade. but i cant get the for loop to loop the question according to their number of total grades [code=JAVA] import …

Member Avatar for verruckt24
0
300
Member Avatar for bebe11bebe

I have two other classes but they are very small, and this is where the error lies. This is my code: [CODE]import java.util.Scanner; public class Player { private boolean isHuman; private int score=0; private Scanner input; public Player(int human) { System.out.println("If you would like to play, press 1. Otherwise, press …

Member Avatar for r.stiltskin
0
124
Member Avatar for BrianK123

does anyone know why this does not work? [CODE]public class AddStudentListener implements ActionListener { public void actionPerformed (ActionEvent event) { //Changes title Title.setText("Add Student"); //Obtians student information from the user Object[] possibilities = {"IB Computer Science", "AP Computer Science", "Algebra II"}; StudentClass = (String)JOptionPane.showInputDialog(All, "What class is \nthe new student …

Member Avatar for sillyboy
0
112
Member Avatar for trelek2

Hi! I'm writing a program thats due tomorrow and I have a problem with one aspect: I can draw the picture I want and everything using paintComponent, but then when the user pulls the edge of the window, the program should resize the whole picture- redraw it i guess... How …

Member Avatar for Ezzaral
0
111
Member Avatar for oldSoftDev

I am trying to read some numerical values from a file and getting this error: Input Error: Error in input: Floating point number not found.; Expecting Real number in the range -1.7976931348623157E308 to 1.7976931348623157E308 [code][code=java] import java.io.*; public class TriangleMain { /** * @param args the command line arguments */ …

Member Avatar for Ezzaral
0
98
Member Avatar for EJD

The following code is producing this problem (typed with exact characters printed in command prompt, aside from quotations): "Please input D for a daytime movie or E for an evening movie: This is not a valid choice." The program will not allow me to input anything following the prompt for …

Member Avatar for EJD
0
111
Member Avatar for olgratefuldead

I'm having some trouble with my code. I want to calculate the final balances of some movie tickets based on their day or night showing (and depending on if they are children or adults). So at the end of the code, I've been trying to get the solution to a …

Member Avatar for olgratefuldead
0
242
Member Avatar for olgratefuldead

I need to figure out how to set my overall ticket limit (aticket + cticket) to 100 and if a customer goes over the limit, then they are told that they have ordered too many tickets and that they need to try again and then it loops back through until …

Member Avatar for olgratefuldead
0
93
Member Avatar for BrianK123

What I am trying to do is read from a file to an ArrayList and then display it using a JOptionPane. The only problem is the code i am having trouble with is in an ActionListener and I believe somehow I have created an infinite while loop because when I …

Member Avatar for verruckt24
0
172
Member Avatar for crzycrusnik

Hello! First time Poster :) I'm trying to create a Java Web Crawler. What I want it to do is pass the crawler a starting site, a max depth/levels of sites to go to (as opposed to number of pages) and save files like images and documents. The problem is, …

Member Avatar for verruckt24
0
228
Member Avatar for kuldeep_java
0
14
Member Avatar for SwatiGulati

I have created a servlet in java(jsp), compiled it bt m unable to run it..it is does as :- [url]http://host//Servlet/ServletName[/url] But if m workinh locally on my pc,what host should I b mentioning?

Member Avatar for stephen84s
0
76
Member Avatar for mic2x_caspe

ah im in 1st year IT student, my project is about to make a Notepad and it should have an event to perform. example: is when i go to [B]"file"[/B] then click the [B]"save"[/B] and it will perform.. pls give some example of class that use an event.. Im new …

Member Avatar for verruckt24
0
153
Member Avatar for auhuman

my Assignment is this : there is a index.jsp with header [COLOR="Red"]welcome[/COLOR].And a link "[COLOR="Red"]open[/COLOR]".when someone click this "open" this must show [COLOR="Red"]HELLO[/COLOR] in the same index.jsp. And this Hello must be from another jsp file ( simply, i want to embed hello.jsp into index.jsp when "open" is clicked ). …

Member Avatar for auhuman
0
151
Member Avatar for staneja

I am creating a simple application using Swings . I am executing search on the database and result i have shown in table. My first query resulted in 8 rows which was shown clearly. Now on same frame i changed the search criteria and clicked search button. Now its resulting …

Member Avatar for masijade
0
79
Member Avatar for apcxpc

Hi all I am programming a database-related application in Java. I have to facilitate several different types of queries, but I'd like to use the same JTable to display the results of each query (one at a time, of course). The problem is that when I'm using one JTable, I …

Member Avatar for verruckt24
0
202
Member Avatar for jhuyenh

I was wondering if someone could help me determine what to put in the actual parameters of the driver's class constructor since I am using scanner for the input. Driver receives the radius and color from the outside, it takes it to Circle to calculate circumference and area, then returns …

Member Avatar for stephen84s
0
93
Member Avatar for rapture

I have the following code which outputs incorrectly. [code] public static void extend(ArrayList priceList, ArrayList quantityList, ArrayList amountList){ for(int i = 0; i < priceList.size(); i++){ amountList.add((Double)priceList.get(i) * (Double)quantityList.get(i)); System.out.println(priceList.get(i) + " * " + quantityList.get(i) + " = " + amountList.get(i) ); } [/code] The output for some of …

Member Avatar for sillyboy
0
112
Member Avatar for gallantmon1

Can I ask if anyone here has any guides or tutorials on how to write a simple proxy server? Simple in a sense that it can be composed of only two classes; the server and the client. It must also be able to accept requests like GET, HEAD, and POST

Member Avatar for sillyboy
0
63
Member Avatar for nimbus3000

I wrote this piece of code. It is giving me an error that i cannot correct. This piece is saved the file: CE.java public class CE { private String first; private String second; private String ssn; private float rate; private float sales; public CE(String fName, String lName, String secu, float …

Member Avatar for nimbus3000
0
102
Member Avatar for Carnelian

In the following codes, I only specified the user to input only 4 numbers in the textfield. I want to output the numbers inputted by the user but I don't know how to do it seeing that the "text" and "value" is different in a formattedtextfield. All I see in …

0
48
Member Avatar for localp

i want to play an audio file in java without opening a player ... like an alarm ... does any1 knows how to do this.. and r there any sample codes available online ... (please provide relevant links only)

Member Avatar for localp
0
181
Member Avatar for r.stiltskin

I have two problems with the focus on buttons in this project. I've pared the code down to barebones to show the problems; there are only 2 simple classes remaining & still the problems persist. It compiles, runs (java ColorView), and all that's required to see the problems is simply …

Member Avatar for r.stiltskin
0
88
Member Avatar for jhonnyboy

hey guys im pretty new to java but im very eager to learn and want to make my first game :) I want a simple RPG game, but also want to make a GUI. I am using Netbeans as my IDE, do i need anything else to make a GUI? …

Member Avatar for stultuske
0
203
Member Avatar for dmanw100

Hello, I am working on a project that requires a set of points to be sorted by their angles in relation to the x-axis. The angles, which are in radians, store their angle as a double value. My insertion sort algorithm is failing to properly sort the points based on …

Member Avatar for dmanw100
0
103

The End.