36,051 Topics
![]() | |
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) | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
What is absolute positioning and whis is its disadvantage? | |
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 = … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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() … | |
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 … | |
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 … | |
[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; … | |
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 … | |
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(); | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.*; … | |
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(); … | |
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! | |
hai..my name is harinath. i cant find javax.speech package anywhere .. how can i get javax.speech package??????? | |
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 … | |
[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); … | |
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 … | |
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. … | |
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() | |
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 … | |
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" … | |
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, … | |
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 … | |
[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()); … | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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.. … | |
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] … |
The End.