36,051 Topics

Member Avatar for
Member Avatar for loidz123

im a newbie to java programming and i wanna know how to create a java program that would let a user enter a 6 character ID number(a combination of 3letters and 3numbers)

Member Avatar for loidz123
0
79
Member Avatar for MWE_QUE

I got this code sample from the internet, [url]http://richardbowles.tripod.com/java/menu.htm[/url] was able to change the deprecated code to BufferedReader to read in the file, but don't know what's wrong with the errors I'm getting. This is sample code I'm trying to get to work so I can step through with a …

Member Avatar for Skyelher
0
347
Member Avatar for mayankdvd1

When I selecting gridview row i am getting the error in the following line onclick="javascript:__doPostBack('grdOrderDetail','Select$0')"> The error message is Microsoft JScript runtime error: Object expected Please help me out Thanks in advance

0
81
Member Avatar for Prateek Salian

Hi All, I am creating an application in JAVA EE for my company where people can upload their .xls files into the fielsystem of the server. Then an administrator can integrate all the .xls files uploaded by the people into a [B]single .xls file.[/B]I am done with the uploading part …

Member Avatar for Prateek Salian
-2
222
Member Avatar for rohitrmehta

Hello, I have a project on hand. I have to build a portal. I am basically a UI person which development skills. Which technology is better for portal development? PHP vs java vs .net vs Ruby? Also if there are any developers with experience in portal development, Give me a …

Member Avatar for Rashakil Fol
0
145
Member Avatar for amatech

Hi, Can someone tell me If my code is right? It compiles ok, but I am not sure if the implementation is right. I am trying to write a singly circular linked list class with insert, getfirst, getNext, delete and empty methods. Can someone help me with this? Thank you …

Member Avatar for amatech
0
141
Member Avatar for Neversleepin

Hello, i try the tutorial Get Attachment File Name from Java2s.com. What i'm doing is to read email from the Outlook Web Access Light. If i put the url address of the Outlook Web Access Light, i have the error: [CODE]Exception in thread "main" javax.mail.NoSuchProviderException: No provider for http at …

Member Avatar for Mr Chips
0
183
Member Avatar for jdm

I'm working on a java program in netbeans and I have it working except to run it I have to right click the main file and tell it to run instead of just clicking the run button. Any help would be appreciated. Sincerely yours; jdm [CODE] /* * To change …

Member Avatar for jdm
0
179
Member Avatar for xanawa
Member Avatar for mKorbel
0
70
Member Avatar for jfountai

Hi all. Learning Java - sorry for my stupidity if you see any. Here is the code: [CODE] private static void readFile() throws Exception { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, DAYS); String fOther = "filename.csv"; String fOtherImp = "filename_imp.csv"; LineNumberReader lineCounter = new LineNumberReader( new InputStreamReader(new FileInputStream(fOther))); String nextLine = …

Member Avatar for jon.kiparsky
0
647
Member Avatar for Cool_Tori

HI! I recently joined this forum as I am about to start a degree in Computer Science and although I have an A level in Mathematics and an interest for computers, I have not studied computer science and wish to read up about it before my course begins. I'm hoping …

Member Avatar for jon.kiparsky
0
137
Member Avatar for coervivekmca

I m having a typically prob...i know how to upload image/file using <input type="file"> to this i set enctye="mulitpart" while using this when i need to add some text field to take data and image form user i can not retrieve text value on next page to save it in …

Member Avatar for javaAddict
0
70
Member Avatar for dreamer14

Any one got hints how to do this? I got 3 drop down list initally all 3 contains 4 option A,B,C,D. After selecting A from 1stdrop down list,the 2nd and 3rd drop down list are left with B,C,D. After selecting C form 2nd drop down list,the 3rd drop down list …

Member Avatar for javaAddict
0
232
Member Avatar for Sybre

I'm new to jsp and am writing some pages to be used internally (ie on our intranet) only. The problem is, I need to know the username of whoever uses the page without them having to go through a login page/popup. I don't require passwords, just the username. Does anyone …

Member Avatar for masijade
0
87
Member Avatar for drogba123

Hi, how to get the name of directory and subdirectory in a folder? example abc1/banana/(text files)? i have some codes buts its not given me the name [CODE] File dir = new File("abc1"); File[] folder = dir.listFiles(); [/CODE] i want to get the subfolder in abc1 called "banana". thanks for …

Member Avatar for drogba123
0
277
Member Avatar for jet101

guys, good day... I know that this is just easy but i've been tweening my work the whole afternoon but no luck. my problem is using setAttribute for java's client-side programming. I just want to create session for my username to be able to use while being logged in. this …

Member Avatar for jet101
0
138
Member Avatar for Caseous

I want to display a message input by a user on an applet /** * @(#)Hello.java * * Hello Applet application * * @author * @version 1.00 2011/3/17 */ import java.awt.*; import java.applet.*; import java.io.Console.*; import java.io.*; public class Hello extends Applet { public void init() { } public void …

Member Avatar for ywang
0
113
Member Avatar for sasi_88

[CODE] <html> <head> <script> function goSubmit() { document.frm.submit(); } </script> </head> <body> <form action ="view1.jsp" method="post" name="frm"> <table> <tr> <td> <input type="radio" name="rg" value="faculty" onClick="goSubmit()"/> </td> <td> <input type="radio" name="rg" value="date" onClick="goSubmit()"/> </td> <td> <input type="radio" name="rg" value="content" onClick="goSubmit()"> </td> </tr> </table> </form> </body> </html> <html> <head> <script> function goSubmit() …

Member Avatar for sasi_88
0
112
Member Avatar for krip_101

I want to display the quote (character) into a text in netbeans Swing form. But it shows only last character. Any help would be appreciated. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String t = encodeText.getText(); String text = t.toUpperCase(); int[]textnum = new int[text.length()]; for(int …

Member Avatar for krip_101
0
255
Member Avatar for loungeowl

Right now my program says there is an error in line 27 of this code: [CODE]Class Netflix: public class Netflix { private static void main(String[]args) { String comedy, horror, drama, action, genre1; Movie a = new Movie(); a.setTitle("Avatar"); a.setCast("Sam Worthington"); a.setGenre('a'); a.setYear(2009); a.setStars(3); Movie b = new Movie (); b.setTitle("Battle …

Member Avatar for Ezzaral
0
219
Member Avatar for romi_001

[code] /** * @(#)GameOfLife.java * * GameOfLife application * * @author Ramanpreet Singh (romiaujla) * @version 1.00 2011/2/11 */ import java.util.Scanner; public class GameOfLife { public static void main(String[] args) { Scanner scan = new Scanner(System.in); final int SIZE = 10; final int GENCOUNT = 9; int i, j, k; …

Member Avatar for Tellalca
0
104
Member Avatar for AnthonyJ

I have an assignment where I need to do some operations on polynomials (add, multiply, ...) which are represented by linked lists. Part of the assignment is to make an inner class Term containing two int fields and a constructor with coef and exp ints) I also need an inner …

Member Avatar for JamesCherrill
0
401
Member Avatar for Desi Boy

Hello I am down to 1 error can anyone please assist; java:41: not a statement + "P or p (premium): "; It is part of this section; System.out.print ("Enter the service type:") + "R or r (regular), " + "P or p (premium): "; serviceType = console.next ().charAt (0); System.out.println();

Member Avatar for JamesCherrill
0
72
Member Avatar for jamezss

Alright, so I'm suppose to be using SAXparser to parse a XML file and output certain parts The assignment asks us to use to classes Course.java and TextBook.java to which we are suppose to create the Course and Textbook objects described in the XML file, making sure they refer to …

Member Avatar for jamezss
0
193
Member Avatar for scranton

can anyone help me? i'm getting the following error: java.lang.IllegalArgumentException: Null property value for 'revision' at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:693) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:741) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:716) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:192) at org.apache.struts.taglib.html.HiddenTag.doStartTag(HiddenTag.java:123) at org.apache.struts.taglib.nested.html.NestedHiddenTag.doStartTag(NestedHiddenTag.java:95) [COLOR="Red"]at /proposal/propAndRev.jsp._jspService(/proposal/propAndRev.jsp.java:1143) (JSP page line 667)[/COLOR] at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458) at com.evermind[Oracle9iAS (1.0.2.2) Containers for …

Member Avatar for scranton
0
442
Member Avatar for desert564

Polybius Square is a table that allows someone to translate letters into numbers. To give a small level of encryption, this table can be randomized and shared with the recipient. In order to fit the 26 letters of the alphabet into the 25 spots created by the table, the letters …

Member Avatar for desert564
0
1K
Member Avatar for gedas

hey, i have x and y coordinates that move around the screen randomly the position of the coordinates always vary they could suddenly stop or the movement speed could increase. what i want is to find out at what speed the coordinates are traveling in miles per hour. (not necessarily …

Member Avatar for mKorbel
0
209
Member Avatar for SCass2010

Hi everyone, For a group assignment we have to develop a property trading game similar to monopoly. At the moment we have the GUI developed as well as a basic idea of how to go about doing it but was wondering if anyone could help a bit!:S Is it possible …

Member Avatar for jon.kiparsky
0
2K
Member Avatar for drogba123

Hi, currently i created a lucene project and currently having a problem with the codes. Here are my codes (which i also refer to some useful websites explain lucene) [CODE] import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Hits; import org.apache.lucene.index.*; …

0
65
Member Avatar for drogba123

Hi all, How do i store matching substring and string inside one single arraylist? example: [[er, every, errant]] which saying er substring is inside string every and errant.how should i make the comparison? basically what i did is only make 2 arraylist a1 = new ArrayList(); a2 = new ArrayList(); …

Member Avatar for JamesCherrill
0
285
Member Avatar for Naqib

i m a student of BCS final year . i want to developed a games in java . any one have idea about game . plz share with me thank you!

Member Avatar for WolfShield
0
108
Member Avatar for harinath_2007

hai..my name is harinath. i cant find javax.speech package anywhere .. how can i get javax.speech package???????

Member Avatar for WolfShield
0
3K
Member Avatar for kay19

Well, here's my problem. I have to Count from Num1 to Num2 by input from the user. So when I input let say 1 to 5, it will display 1 3 5. If I do 2 to 6, it would display 3 and 5. I can't seem to get the …

Member Avatar for kay19
0
454
Member Avatar for desert564

[code]import java.io.*; class caesercipher { String str; int key; public void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ENTER A STRING"); str=br.readLine(); System.out.println("ENTER A SHIFT"); key=Integer.parseInt(br.readLine()); String encrypted=encrypt(str,key); System.out.println(encrypted); String decrypted=decrypt(encrypted,key); System.out.println(decrypted); } public String encrypt(String str,int key) { String encrypted=""; int i; for(i=0;i<str.length();i++) { int c=str.charAt(i); if(Character.isUpperCase(c)) { c+=(key%26); …

Member Avatar for desert564
0
121
Member Avatar for desert564

A matrix to be designed in following manner for a n x n order : 1 5 9 2 12 13 14 6 8 16 15 10 4 11 7 3 view sourceprint?01 int i,j,k,l,m,b=n; 02 int w=1, x=2, y=3, z=4; 03 int a[][] = new int[n][n]; 04 for(i=0;i<=n/2;i++) 05 …

Member Avatar for desert564
0
78
Member Avatar for inni2626

Hey everyone, New to Java and i was hoping if anyone could assist me.I needed to write a program that could display results of Champions League initial menu screen with the following set of options: 1. Display the current score for each possible response. 2. Vote 3. Quit the program. …

Member Avatar for Taywin
0
641
Member Avatar for kukuruku

Hi ,I have super class vehicle,truck extends vehicle,and I created array in test class full with objects from vehicle and truck,how can I call method from vehicle,is this the way (truck)object1[1].getMethod()

Member Avatar for jwenting
0
353
Member Avatar for rjdelight

I trying to finish this assignment for Java and it's really getting to me. I haven't had this much trouble in the past, but things ramped up pretty quickly and I'm really stuck. I'll post what I have, although it's not much, if someone out there is kind enough to …

Member Avatar for masijade
0
175
Member Avatar for Chrissie1185

I am an extreme newbie when it comes to JSP and I am really stuck. This is my code: [CODE]while (rst.next()) { id=rst.getString("ID"); nme=rst.getString("Name"); twn=rst.getString("Town"); cny=rst.getString("Country"); out.println("<tr>"); out.println(" <td width='10%'>"+id+"</td>"); out.println(" <td width='20%'>"+nme+"</td>"); out.println("<td width='10%'>"+twn+"</td>"); out.println("<td width='10%'>"+cny+"</td>"); out.println("<td width='10%'>Edit</td>"); out.println("<td width='10%'>Delete</td>"); out.println(" </tr>"); } out.println("</table>"); out.println("</center>");[/CODE] Where it says "edit" …

Member Avatar for javaAddict
0
145
Member Avatar for davedrave

Hi, first time poster, and fairly new to java swing.Im trying to make a scrabble game and am stuck while trying to place a letter on the board, or even removing one for that matter. The playing board is just an array of JButtons all derived from a ScrabbleButton object, …

Member Avatar for Ezzaral
0
391
Member Avatar for sciprog1

Hello, The following custom class has compiler errors where it is not recognizing KeyListener. Any idea on why I am getting this error? [CODE]import java.util.concurrent.*; import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class worker1 extends Thread { private SynchronousQueue<Object> q; private int i; public worker1(SynchronousQueue<Object> q) { super("Worker …

Member Avatar for sciprog1
0
224
Member Avatar for kholiokhong

[CODE] import java.io.*; import java.net.*; public class Server { ServerSocket ss; ObjectOutputStream oos; ObjectInputStream ois; public Server() { try { ss = new ServerSocket(8888); } catch(IOException e) { e.printStackTrace(); } } public void run() { String message; try { Socket sock = ss.accept(); System.out.println ("Connection received from " + sock.getInetAddress().getHostName()); …

Member Avatar for Ezzaral
0
113
Member Avatar for incubus9x9

Hey guys!! first off please dont tell me to google it, iv already done my searching with google and various text books lol ... Ok So i understand how to find numbers in a linear search by inputting 10 numbers and searching. Now i need to do the same except …

Member Avatar for Taywin
0
3K
Member Avatar for Katana24

Hi - Im creating the game "Tanks" for the fun of it. Im fine with creating and adding the images and other inner game workings but I have digressed abit and have encountered a problem. The problem is this: I have painted the tank image to the panel but wanted …

Member Avatar for mKorbel
0
94
Member Avatar for lorettah

the below code display the bill date fields empty when testing the code.can someone assist in identifying the error? [code]String custId = request.getParameter("customerId"); String emailId = request.getParameter("emailId"); String phoneNumber = request.getParameter("phoneNumber"); String[] dateStr = new String[3]; String[] status = new String[3]; try { //Code to connect to the database String …

Member Avatar for Taywin
0
123
Member Avatar for gedas

hey, i have got three sets of x an y coordinates , where one of the x y coordinates keeps on changing all the time. lets say i have first set where the coordinates are int x=100 and int y=100; second set would be : int x=100; int y=150; but …

Member Avatar for Ezzaral
0
968
Member Avatar for rohit2

I have created a java application in which JTextpane is used as an editor. Now my problem is that when I select a block of text and press tab key, it automatically deletes the selected text contents. I don't expect these behaviour for my tool's editor. I need to add …

Member Avatar for mKorbel
0
276
Member Avatar for roshanchugh

How Do i execute a jsp file placed on another machine on LAN.I have written my code in netBeans using Glassfish server..It will be helpful if i get a reply

Member Avatar for peter_budo
0
112
Member Avatar for shoeson

Hi there, we are trying to do a project on Web based video conferencing.. i guess we will test it on LAN. it will be a web page where multiple users can perform video conference... we are confused which platform to use for this? Java or C#, please suggest kindly.. …

Member Avatar for peter_budo
0
179
Member Avatar for wonder_laptop

Hello, i downloaded aglets 2.5 from this site : [url]http://fluca1978.blogspot.com/2010/07/aglets-25.html[/url] please read the first comment by [U]nader 74[/U] : [CODE]Hi, I'm student. I have use Aglets2.0.2. But, when I used Aglets 2.5-alpha, I can not install the ant and I use Java_Home = C:\Java\jdk1.6.0_21 ant I have this error :[/CODE] …

0
136

The End.