dear sir Hi, In text field I want to restrict No of character entered should be only 3 if fourth character entering in same TextFiled it should not allow. How to solve it ? Warm regards sunil

Member Avatar
Member Avatar
+0 forum 2

I am trying to get more control on user input. I have written a couple of Exceptions to handle two different user inputs, but I want to program to retry it if it is invalid and allow the program to continue. I have tried using a labeled break and it did not work out right. I will post the source code below and made the sections in question in bold. // wmivey // MortgageProgram import java.text.*; // Needed for NumberFormat import java.io.*; // Needed for user input class MortgageProgram { public static void main(String[] arguments) throws IOException { /* All …

Member Avatar
+0 forum 0

Conveyor belt slideshow script- I am adding lots of images and linking them to the matching pages. Question: 1.Is there a way to set an anchor code so the slide show continues at the last clicked picture and does not start from the beginning ? 2. Opening the link in a new window (target="blank") helps only if window is closed immediately. Is there a way to stop the slideshow ? Thank you for any help Paul [email]fridman813@yahoo.ca[/email] <script language="JavaScript1.2"> /* © Dynamic Drive ([url]www.dynamicdrive.com[/url]) For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ //Specify …

Member Avatar
Member Avatar
+0 forum 1

How can I read a string in from the user? For example, I am writing a console-based java application which prompt the user to enter a string and then reads that string in. What is the opposite of System.out.println? ;) System.in.readln? I can't get it to work and I'm a Java newbie :(

Member Avatar
Member Avatar
+0 forum 3

Hi, my problem is: Need execute a application and not display this application on screen, but need save the main Frame as image (JPG or other format) in one archive, or draw it in a variable in memory to use her as a texture of an object 3D. Please help me. How i can do this? Thanks.

Member Avatar
+0 forum 0

do you have simple code client and server for a smal example of chat multithreaded? :p

Member Avatar
Member Avatar
+0 forum 1

I have two classes. The first collects input data and calls a second class for inputing data from a file. After the data is read I would like to use it inother classes but am having problems getting the data back. To save space I will only show part of class I (calling class) which works, and all of class II that inputs the data O.K., but does not return it to class I: CLASS I (Partical) . . . try { Climate.climaticData(County); // this works } catch (FileNotFoundException e) { } catch (IOException e) { } System.out.println(climateDataOut[3]); // Does …

Member Avatar
Member Avatar
+1 forum 5

Im new to java programming. I want to establish a connection to my MS-sql database using java. How do i do it?

Member Avatar
Member Avatar
+0 forum 2

I wrote a program that was compiled successfully. I wrote another program to use it but it will not see it. I am using JDK 1.4._2 "import java.io.*; import java.sql.*; class RunPM4DataAdmin{ public static void main(String[] arg){ PM4DataAdmin trythis = new PM4DataAdmin(); int requiredSize = trythis.getSize(); System.out.println(requiredSize); } } Trying to compile this, I get the following cannot resolve symbol class PM4DataAdmin. But I know PM4DataAdmin was successfully compiled and it should see this class successfully. Thank you for your help.

Member Avatar
+0 forum 0

Hi All I am a c++ programer tring to run my exe from a java interface. But the java interface that i wrote run on windows and the c++ exe is in unix. This is not helping me: Process p = Runtime.getRuntime().exec("\\bmdth01\\ddef03\\ksh_sh"); the unix is mapped to my comutere via samba but i did not succed to run it . Mybe somone have any idea how to do it :?:

Member Avatar
+0 forum 0

I am pretty fresh in the java environment but i am working hard to learn. I wrote the code for a calculator, however I am having problems in making the memory buttons function properly. I have to create 4 memory buttons that function in the following way: When the memory button is pushed once, whatever value is in the textfield has to be remembered. When the same memory button is pushed again, the remembered value has to be placed into the text field, and so on. The major conflict is that all four buttons must store and draw their values …

Member Avatar
Member Avatar
+0 forum 1

I'm currently working on a program that's like target practice. You literally hit...targets! However, the constant blinking that occurs when the repaint method is called has become quite annoying! :mad: I have a Timer method coupled with the ActionListener to update the screen. The need for the update is because I move the targets by pixels so when the ActionListener is called, it changes the coordinates of the targets. Because pixels are small, the repaint method is called about 100 times per second. This is supposed to make the targets move seemlessly throughout the Applet; however, the applet blinks so …

Member Avatar
Member Avatar
+0 forum 1

My problem is that :After using the program once how could i re-use it again? For axample :After i push "datalar"(meaning datas) and put the datas in after that you have to push "

Member Avatar
Member Avatar
+1 forum 4

Hi, this is my first post and I need help with a project. I'm trying to create a target with a recognizable boundary so when you click anywhere inside the circle, a point is added to the top-left corner of the applet. I've succeeded in being able to click inside the 'boundary box' that encapsulates the circle/target; however, I need the boundary to be the exact shape of the circle, not the 'invisible' boundary box around it. Here is what I got so far... import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import java.util.*; public class Target extends Applet { …

Member Avatar
Member Avatar
+0 forum 1

Hi I am working on an application with many arrays and the output needs to be in differnt formats on a page. That is I will have tables, graphics and regular lines of text. It would be nice to view the information and than have the ability to print it out. Someone suggested that I look into one of Java's report generators. I thought that I would need only a print preview tool. I need help deciding if I need a Report Generator or a Print Preview tool. Also, any suggestion for a specific tool (with good examples) would be …

Member Avatar
Member Avatar
+1 forum 2

hi, I have a little problem in my project that I came-up with this morning (programming a simulation of a 24h-pizza-dispencer) [COLOR=Navy]I need to count the decimals after the comma of a double[/COLOR] how do I have to write this? ex.: 12.12 -(outcome)-> 2 decimals 12.123 -(outcome)-> 3 decimals (the double is a price, entered in EUR ... and I want to catch that possible error) much thx for your help! --------------------------------- this is what I already tried-out (although inventive, I understand why it doesn't work :cool: ) [code] temp=Double.parseDouble(prijsT[lade].getText()); for(decimalen=0;temp%temp==0;decimalen++) { temp=temp*10; if(decimalen>=2) { JOptionPane.showMessageDialog(null,"De Prijs kan maximaal bestaan …

Member Avatar
+0 forum 0

I wrote a program, and when I compile I keep geeting cannot resolve symbol in four locations. Is there an easy way to fix the problem

Member Avatar
Member Avatar
+0 forum 1

Hi all :) I'm trying write an email program in java which can send an SMS when an email is recieved. However, I dont know much about this like for example, do I need to have any authorisation from a telecommunications company to do this? Also, I want it to operate on voice command(Writing, sending emails and all).Again, I really dont know much about it and what the scope of it is. So before I start my research and everything, I'd appreciate it if anyone can give me any idea or just a point in the right direction. Thanks in …

Member Avatar
Member Avatar
+0 forum 3

Can someone help me design the algorithm for this project. I am not asking for any code, just a plan of atack. [b][font=Arial][color=#8f0000]Option 3[/color][/font][/b] [b]Purpose:[/b] The purpose of this programming assignment is to pull together all the programming skills of this semester. The assignment will be an exercise in problem solving, class design, methods, event-driven applications, graphics, exception handling, file pro cessing, Strings, linked lists, and threads. [b]Preparation:[/b] In your textbook, you should read sections: 20.1

Member Avatar
+0 forum 0

I am (very) new to Java and am trying to convert a large VB 6 program to Java. My program does a lot of calculations and then outputs the information to screen, file or printer. My problem is outputting the data in a certain formate and viewing/printing the info. The out put looks a little like this: Name Date Number City My Title - New jan feb mar............Total data1 x x x xx data2 x x x xx data3 x x x xx In VB I have an OCX that does the trick. I though I found a JAR to …

Member Avatar
Member Avatar
+0 forum 2

[size=3][font=Times New Roman]What parts of the client code if any need to be changed in a client-server system (i.e. code using sockets) if the server is moved and why? [/font][/size] [size=3][font=Times New Roman]What parts of the client code if any need to be changed in a system using RMI if the server is moved and why? [/font][/size] [size=3][font=Times New Roman]I

Member Avatar
+0 forum 0

Ihave an application that is written using JSP and Java Servlet. Now I need to add more functions to the application. I need to allow the users to upload word files, and send it as email attachment. Please help. Thank you in advance for your help.

Member Avatar
+0 forum 0

[font=Comic Sans MS][size=4]Hi Everyone,[/size][/font] [font=Comic Sans MS][size=4]I am a student and I have been asked to make a program to create business cards. At the moment I have made a fully working application with file IO. The program basicly takes any input into the text fields and displays them on a business card template. Also it is necessary for the program to put a logo onto the business card by means of selection boxes. I already have written methods for drawing the logos, at the moment they are seperate applets. On my application I have included seletion boxes but at …

Member Avatar
Member Avatar
+0 forum 2

there are two examples which are seperated by"-------" sign to use them just put them through a java creator.post for comments ------ "A rational anachist believes that concepts such as 'state' and 'society' and 'government' have no existence save as physically exemplified in acts of self-responsible individuals.He believese that it is impossible to shift blame,share blame,distrubute blame.... as blame,guilt,responsibility are matters taking place inside human beings singly and [i]nowhere else.[/i]But being rational,he knows that not all individuals hold his evaluations,so he tries to live perfectly in an imperfectworld...aware that his effort wil be less than perfect yet undismayed by self-knowledge …

Member Avatar
Member Avatar
+0 forum 4

well it actually works but the circle kind of slides instead of staying put.Help with the algorithm would be welcomed.(actually i need help:sad: ) ---------------------------------- import java.awt.*; import java.awt.event.*; public class hata{ public static void main(String args[]){ Pencere pen=new Pencere(); pen.setVisible(true); } } class Pencere extends Frame { int xcoor,ycoor,width,height, solx,soly; Checkbox cb_merkez,cb_sol; CheckboxGroup cbg_baslangic; boolean merkez_mi; public Pencere(){ setTitle("

Member Avatar
+0 forum 0

How To Drag And Drop An Image Onto A Tabbed Pane

Member Avatar
Member Avatar
+0 forum 1

I am studying Programming and trying to get my assignment to work the problem is with the MAINTENANCE PART in red I can get it to work! Can anyone help!!!! public class Assignment2 { static final int TotalCans = 50; // The total number of cans avaliable static String Drinks[] ={"Coke", "Sprite", "Water", "Orangina"}; static String Price[] ={"40p", "50p", "80p", "70p"}; static String Coins[] ={"10", "10", "10", "10"}; static String Accept[] ={"5p", "10p", "20p", "50p"}; public static void main(String arg[]) { /*-- initial setting--------------------------*/ int Cans[] = new int[4]; for (int i=0; i<4; i++) Cans=(int)(TotalCans*Math.random()); //Then goes the major part …

Member Avatar
Member Avatar
+0 forum 1

Alright i have the code [b]shapes[i][/b] Ahat would the equivalent of that be for a linklist named list? I tried [b]list.getdata(i)[/b] but it's not working. Can anyone help me?

Member Avatar
Member Avatar
+0 forum 1

Ok, this is an extremely stupid question, and I feel retarded for asking, considering how much I've been studying Java. But anyways, here goes. Let's pretend I've created three classes, Class A, Class B, and Class C. Now in A I create an instance of Class B, let's call it AB. And I modify AB's variables, and invoke methods on it. Object AB holds valuable info, say for a database. Now in C I create another instance of Class B, I'll call it CB. From class C, is there any way I can specific information, such as instance vairable values …

Member Avatar
Member Avatar
+0 forum 1

Hi there, I'm currently writing code for a translator. The task is to open a file from anywhere on my network, then display it and then allow to save the file. So far I have a window that allows a user to browse for a file, open the file and save it, however, the file needs to be in a certain format, eg, not the form it is saved on the drive as. Example : One line from the file is R0001: C0001 + C0002 <=> C0003 these are reactions, products and reactants, the program is required to re-organise these …

Member Avatar
Member Avatar
+0 forum 2

The End.