36,051 Topics

Member Avatar for
Member Avatar for miraj0072004

hello friends, I am making a GUI for a certain fill up form using netbeans..here I need disable a "next" button until all the text fields are filled up...I have tried writing a method that which is called during every keypress event in a text box that checks whether the …

Member Avatar for javaAddict
0
257
Member Avatar for joshianurag18

Hi, I am getting this error. "org.apache.commons.net.MalformedServerReplyException: Could not parse response code." after this line...ftp.connect(ftpHost.getHostName(), 22); Please help me. Thanks, Anurag

0
74
Member Avatar for sixdegreesunder

Hi everyone, I'm new to java. I'm getting an error cannot find symbol m_weapon when i compare char which i assigned from math.random. Thank you, [CODE]public class RPS { public static void main (String[ ] args) { Scanner console = new Scanner(System.in); //used to gather user input System.out.println("WELCOME \n\n"+ "This …

Member Avatar for kramerd
0
217
Member Avatar for jaymozart

[CODE] import java.io.*; import java.util.*; import javax.swing.JOptionPane; public class A15 { public static void main(String[] args) { if(args.length != 1) { JOptionPane.showMessageDialog(null, "Error: Enter one command line argument."); } else { try { String[] array = LeeJungBum15.readFileReturnWords(args[0]); // read file sortAndPrintArray(array, args[0]); // sort alphabetically and print the arrays } …

Member Avatar for jaymozart
0
168
Member Avatar for guru_tech

Well i can see lot of career related questions are posted here So i thought i could contribute something for youth. with more than 5 years of Experience in above subjects I have decided to take classes. Location : Mumbai . Subjects: C Java: Java Basic. Advance Java. C#. VB …

Member Avatar for masijade
0
191
Member Avatar for JanineXD

I was browsing the web for examples on how to partition in Java. [URL="http://www.cs.princeton.edu/introcs/23recursion/Partition.java.html"]I've got to this website that has a detailed example about Partitioning[/URL] so I've tried to run it on my JCreator Pro. I've only got one error, but I've tried all I can do to fix it …

Member Avatar for javaAddict
0
354
Member Avatar for Dean_Grobler

Hi there, Consider the following code, this is a little 'snipet' from one of my classes: [CODE] private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) { NewContact n = new NewContact(); } [/CODE] The method is expected to open a new Frame, where the class of the new Frame is called "NewContact". I've recently …

Member Avatar for JamesCherrill
0
374
Member Avatar for ug61oxk
Member Avatar for masijade
1
365
Member Avatar for Claude2005

Hi there, Let's say I have this HTML code below... [CODE] <html> <head> <title>Page 1</title> </head> <body> <form method="post" action="page2.jsp> <table> <tr> <td>John Doe</td> <td><input id="name1" name="name" type="submit" value="Edit" /></td> <tr> <tr> <td>Steve Smith</td> <td><input id="name2" name="name" type="submit" value="Edit" /></td> <tr> <tr> <td>Peter Pipper</td> <td><input id="name3" name="name" type="submit" value="Edit" /></td> …

Member Avatar for javaAddict
0
118
Member Avatar for serph09

Hi everyone, I just started on learning java and I have this problem I'm trying to figure out. The question is asking me to have my program read the twelve temperature values and print the month with the highest temperature. This is what I have so far: [CODE] public static …

Member Avatar for masijade
0
542
Member Avatar for mimsc

any suggestions? <%@ page language="java" %> <%@ page import="trader.webservices.data.LeadDAO" %> <%@ page import="trader.aabacrm.LeadsList" %> <%@ page import="trader.webservices.data.*" %> <%@ page import="trader.webservices.presentation.Lead" %> <%@ page import="trader.webservices.data.UserInfoDAO" %> <%@ page import="trader.webservices.data.UserDataVO" %> <%@ page import="trader.webservices.data.ButtonDAO" %> <%@ page import="trader.webservices.constants.UserConstants" %> <%@ page import="trader.webservices.util.Utils" %> <%@ page import="java.math.*" %> <% RequestDispatcher dispatcher = …

Member Avatar for masijade
0
2K
Member Avatar for jems5

I would like to develop a character array output that outputs ONLY a single character in each position. While my programming appear to work fine with filling all spaces with a single character or with 2 characters one each at alternating spaces, its not the same with designated position. For …

Member Avatar for jems5
0
1K
Member Avatar for sateal8

How would I validate a date input that looks like 01 / 23 / 10? It needs the spaces and slashes. i know how to validate the month day and year i just can not figure out how to validate the blank space and slash in Java.

Member Avatar for kramerd
0
86
Member Avatar for ARGF

I am trying to edit a code we were given and it's not working for me when I incorporate the scanner code Basically every place where the code says 'public static void', it says there is an illegal start of expression I HAVE to use methods for this code I …

Member Avatar for ARGF
0
148
Member Avatar for Cheese Man 808

Hey guys, I'm having a bit of trouble with my program. It seems that out.print(translationText) only prints out the last line in theStringBuilder translationText. It's really werid, because System.out.print(translationText) prints out everyline from the StringBuilder translationText. I added append to be true for the FileOutputStream object, but now it just …

Member Avatar for Cheese Man 808
0
1K
Member Avatar for Sonia11

Friends, I have a major problem with recursion. My question is how do you reverse a string in java by applying recursion. It's quite easy working wthout recursion by using using StringUtils.reverse, but I really really need help with recursion on this question.!!!!!!Please!!!!!

Member Avatar for cale.macdonald
0
108
Member Avatar for mallak alrooh

Hello : I have this question and I solve the half of it I wont your help in other codes.. We have do a code for every commend ... In this project you will develop many commands that are related to file operations, as in the following list (red colors): …

Member Avatar for kramerd
0
119
Member Avatar for TheSecOrg

How can I change the color of the font or text? I've tried area.setFontColor, area.setColor, comic.setColor. area is the JTextArea. comic is a font. arial is a font. I have a [code]final Color red = new Color(); red = Color.red;[/code] but I don't know how to set the Font or …

Member Avatar for Ranjitdani
0
146
Member Avatar for printmatic

Firstly, Hello everyone! Ok so I am going through exercises in my Java book and am having a problem with this one question. Basically, it wants a user to input a telephone number as letters capital or lower case, spaces or not... eg. Get-Loan which would be 438-5626. So the …

Member Avatar for kramerd
0
273
Member Avatar for himmat.m4

Hi, I am ajax in following concept. In jsp page have 2 div. first div contaion one dropdownlist for selection city onChange event send data to servlet and other div contain another dropdownlist for displaying cities which are come from servlet. Here problem is after selecting city through 1st dropdownlist …

Member Avatar for Airshow
0
164
Member Avatar for Ranjitdani

we planned to rewrite our System in Java, Which was previously running in Stored procedure. More than 5 Applications calls the procedure which inserts and updates some set of records after the post transaction which has been done in the background. Now we planned to take the stored procedure out …

Member Avatar for Ranjitdani
0
117
Member Avatar for jim20

I need to use a rich text editor for my project, What would be the right choice to use that.and also can i get a example on that???

Member Avatar for jim20
0
134
Member Avatar for Xufyan

In this program i have input name and code in super class and print it, it also print in sub class [iCODE]Manager[/iCODE] I created the object for super class to input name and code, and another object to input Manager's Data, but in the output the Name is showing null …

Member Avatar for JamesCherrill
0
140
Member Avatar for EEETQ

Hi guys, I'm writing a program to do several things involving getting information from the user about a book (title, author, publisher etc.) There is a Book class and then the client class BookClient. I got the program working for the user entering a single book but then I changed …

Member Avatar for EEETQ
0
140
Member Avatar for oling

Hi, I am a programming newby and trying to write a Java code that does the following: - User inputs a string of choice (this part is ok) - Program reads every third character of the string and replaces with an X Any help would be appreciates. Thanks, oling

Member Avatar for javaAddict
0
90
Member Avatar for moustafa taha

Hello every one i need to help me in understanding this small program ...you can approximate by using the following series ∏=4(1-1/3+1/5-1/7+1/9-1/11+1/13-.....-1/(2i-1)+1/(2i+1)) write a program that displays the value for i=10000,20000,....,and 100000 I've developed this code to solve the problem [CODE]public static void main(String[] args) { int count=1; double sum=0; …

Member Avatar for masijade
0
286
Member Avatar for muthumari

Hi, Using enter key only,How to go to the next page in submit button(without clicking that button(onclick) , using the tabkey).Anyone can u help me..... Thank you

Member Avatar for sravanthi07
0
501
Member Avatar for spades0001

import java.io.*; public class Amortization { public static void main (String[] args)throws IOException { BufferedReader dataIn=new BufferedReader (new InputStreamReader (System.in)); double loanamount=0.0, interestrate=0.0, numberofyears=0.0,amortization=0.0, a=(1+interestrate),b=numberofyears ; String TextInput; System.out.print ("Input the loan amount: ") ; TextInput=dataIn.readLine () ; loanamount=Integer.parseInt (TextInput) ; TextInput=dataIn.readLine () ; System.out.print ("Input the interest rate: ") …

Member Avatar for dangari
0
236
Member Avatar for manosha

hi 2 all, I'd like to ask: how can we Concatenate elements of two dynamic arrays?? and if there is any example it'll really help. thanks in advance :)

Member Avatar for javaAddict
0
56
Member Avatar for llocks

Hello everyone, I am currently taking java and Im trying to learn how to write methods. I want to know learn the best way that I can learn how to read/write methods in a code. Im currently writing a code using lastindexOf. I do understand that im using this to …

Member Avatar for javaAddict
0
97
Member Avatar for pk.sharma
Member Avatar for masijade
0
32
Member Avatar for judgemental

I have several classes(all in swing). How can I put all the classes that I have create into tabbed Pane? I have 4 class: Intro in=new Intro(); Hist his=new Hist(); Product pro=new Product(); Contact con=new Contact(); [CODE]import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTabbedPane; public class MainControl extends JFrame { …

Member Avatar for masijade
0
126
Member Avatar for notuserfriendly

I am reading from a file. After i tokenize and assign each value to a string field i call the constructor and initialize the object. next i want to add them to an array. I have done this with a vector and all i do is [CODE=java]ObjectVec.add(obj1);[/CODE] Mind you this …

Member Avatar for masijade
0
175
Member Avatar for wowz

[CODE]public class Triangle { /*-the lengths of all sides -the perimeter -the angles at all corners -the area */ public Triangle(double xa, double ya, double xb, double yb, double xc, double yc) { x1 = xa; y1 = ya; x2 = xb; y2 = yb; x3 = xc; y3 = …

Member Avatar for masijade
0
162
Member Avatar for bella422316

I would like the output to be JUST the TIME. Currently it also displays the date. How do i fix this. [code] <html> <head> <title> Start and stop a clock </title> </head> <body> <input type="text" size= "60" id="theclock" /> <script type="text/javascript"> var setIntervalID = window.setInterval("setClock()",1000); function setClock() { var now …

Member Avatar for cyrillc
0
74
Member Avatar for cretaros

Hey Lifesavers! How can i dispose the current frame holding the combobox on item selection to navigate to the next frame. The dispose(); method does not dispose the Main class, when i select supplier item onthe combo list. how can i reolve this; sample code from the sodes is below. …

Member Avatar for masijade
0
233
Member Avatar for ssubnel

How do I make my array legal? It doesn't seem to like my style here. [CODE]import java.util.Scanner; public class solveQuadratic { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner (System.in); double[] eqn = new double[2]; double[] roots …

Member Avatar for ssubnel
0
125
Member Avatar for himmat.m4

Hi, I have following ajax code so here I want to help to edit the code. I have servlet name is SendInfo.java. here feaches destination cities and add into Arraylist according destination city selected by dropdownlist listFrom then that Arraylist send back to displayCity.jsp and displayed in second dorpdownlist listTo. …

Member Avatar for himmat.m4
0
94
Member Avatar for Kratoswoo

Im trying to do this code to create a Parking ticket Simulator. This is the code. public class Parking_Ticket { private String make; private String model; private String color; private String licenseNumber; public int minutes; public class ParkedCar { private String make; private String model; private String color; private String …

Member Avatar for Kratoswoo
0
245
Member Avatar for flyingcurry

The code for the Towers of Hanoi is here, the problem is what will the rest of the recursive calls be? [CODE] //provided in the main method that String Src="Src", Aux="Aux", Dst="Dst"; public static void solve (int diskNumber, String Src, String Aux, String Dst) { if (diskNumber ==0) return; else …

Member Avatar for flyingcurry
0
134
Member Avatar for Tiny_trixer

The program I'm supposed to make a program where one thread starts three other threads. The original thread is going to wait until the three other has finished running and then the first thread can stop. The way I've built the program the three threads is started from one class, …

Member Avatar for Tiny_trixer
0
147
Member Avatar for meowbits

Probably easiest if I just quote, [QUOTE]5) Assignment Entity, A class that models an association between an Employee and a Project Each project usually has several employees working on it at any one time, but there may be none at times. Each employee must work on at least one project, …

Member Avatar for goonj
0
166
Member Avatar for lexflash

Hey guys, I need to create a software which can read a barcode and I should be able to enter the value obtained from it into a database and also I need to compare them with certain values. I am comfortable working in java and would like to know how …

Member Avatar for peter_budo
0
96
Member Avatar for Xufyan

From what I gather as a Java beginner, when accessing instance members, the "this" keyword may apparently be used. see this program, [CODE]class sphere{ static final double PI=3.142; static int count=0; double radius,xcentre,ycentre,zcentre; sphere(){ xcentre=0.0; ycentre=0.0; zcentre=0.0; radius=1.0; count++; } sphere(double xcentre,double ycentre,double zcentre){ this(); // what does this mean …

Member Avatar for ruchi18
0
241
Member Avatar for Xufyan

Setter getter ..? what is this and what it does ? i searched over google but didn't find the suitable answer...!

Member Avatar for imtiyaz41
0
460
Member Avatar for k.santhan

Hai To All i want to create a siftware using java pls help me to create software thx k.santhanakrishnan SNIP

Member Avatar for kramerd
-1
41
Member Avatar for blackeyedanel

im getting an error while trying to print array contacts[i], why? any help? Thanks! :) this is my class Address where im gettingthe error: [CODE]import java.io.*; import java.util.*; public class Address{ //Declare variables String first; String last; String homeadd; String homeph; String cellnum; Scanner sc = new Scanner(System.in); public Address(String …

Member Avatar for javaAddict
0
4K
Member Avatar for severman

Hi all I have a gantt chart which i draw with JFreeChart. I want to add to this grpah a line that shows the current date. Does any 1 knows how to do it? Here is the code that i've written: [code] /* * To change this template, choose Tools …

Member Avatar for alexraa
0
190
Member Avatar for virendra_sharma

Hi friends, which are the JAVA API's available for to connect your application with LinkedIn.

Member Avatar for JamesCherrill
0
82
Member Avatar for Dean_Grobler

Hi there, I just wanted to find out if one can have a actionListener() in one .class file and then have the actionEvent() in another .class file? If not, how would I go about to get the same effect? Thanks!

Member Avatar for Dean_Grobler
0
450

The End.