35,618 Topics
![]() | |
hy friend i want a simple example of keyborad event handling . how i call the the keylistener interface method which are implemented in another class, from main method of program. Second when i press any key from keyboard then the keycode and charachter are displayed thanks | |
I have created 3 files: SmsInbox, SmsGetData and SmsMsg. I don't know if I set this up right. I want Phonenumber, message and time to be stored in the Jlist and when I double click it It will print out the phonenumber, message and time. How do I print it … | |
this is my problem my jsp page is [code]<%@ page import="java.sql.*"%> <%@ page import="java.util.*"%> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:truth","sa",""); Statement st=con.createStatement(); String cate=request.getParameter("T3"); String user=request.getParameter("user"); String pass=request.getParameter("passwd"); String reenter=request.getParameter("rpasswd"); String mail=request.getParameter("mail"); String credit=request.getParameter("credit"); String address=request.getParameter("add"); String city=request.getParameter("city"); String state=request.getParameter("state"); String country=request.getParameter("country"); String mobile=request.getParameter("mobile"); out.println(user+pass+mail+mobile+address+city+state+country); st.executeUpdate("insert into usertable values('"+user+"','"+pass+"','"+mail+"','"+mobile+"','"+address+"','"+city+"','"+state+"','"+country+"')"); response.sendRedirect("Index.jsp"); %>[/code] this … | |
is it possible to use a jsp page with a java bean to get values dynamically. ie: the name is incremented each time but i need the gets and sets for each property to get their values and set them on the bean, can i do this dynamically? Thanks [CODE]<td><p … | |
Hello java programmers, I want to draw some squares on layers using Graphics2D, course. Here is my source code with problems: [CODE]import java.awt.*; import java.util.ArrayList; import java.util.List; import javax.swing.*; public class Draw extends JPanel { private static final long serialVersionUID = 1L; private List<Cube> cubes = new ArrayList<Cube>(); public static … | |
I'm trying to write some code that will write certain variables to a text file and create a simple record system. So when a button is clicked the variables are calculated and written to a text file. How can I set it up so that when the button is clicked … | |
is there any way to find browser location based on city ,state or country....to switch home page accordingly | |
On a project I am currently working on, we are supposed to differentiate between different classes of users based off their IDs (which are 10 digits). For example, one group's IDs should all start with a 9 (marking them as belonging to that group) and the other groups should start … | |
Hi, I am updating a Web Service server from JBoss 4.2.2 to JBoss 5.1, however when I began to use JBoss 5.1 I've got an error saying that one of my properties files could not be loaded. I have put this file in the following path: C:\Servers\jboss-5.1.0.GA\server\default\conf And I am … | |
The below is my property file when i give a node name it should retrive the property names like nodename,queuename etc.............. [CODE] ComIbmComputeNode Property Starts property1 = NodeName property2 = DataSource property3 = Transaction property4 = ComputeMode property5 = TreatWarningsasErrors property6 = ThrowExceptiononDatabaseError property7= Validate property8 = FailureAction Property Ends … | |
Hello peeps, I want to test out this program but i am having problems! each time i run it - it goes " java.lang.NoSuchMethodError: main Exception in thread "main" " I know why i am having this error - coz i am missing my "public static void ....." But the … | |
When [B][I]floating point division[/I][/B] operator is [I]overloaded[/I], it [U]remains nothing[/U] ; :idea:So what is the [COLOR="Green"]role and importance[/COLOR] of [U][B][I]floating point remainder operator[/I][/B][/U],:icon_rolleyes: how it [COLOR="Red"]differentiate[/COLOR] from [B]integer remainder operator[/B] ? | |
I want to create a web application that enable the user to create java jar file using PHP.. How to create java jar file using PHP? Could anyone give the code? appreciate it...thnks.. | |
Hi All, I don't know if I'm asking it right. I have a jsp for monthly report that calling java class and passing date parameter (year and month) into that java class. The java class has a statement that call procedure in database. It's so time consuming to show the … | |
OK, here's my assignment: Write static methods public static double sphereVolume(double r) public static double sphereSurface(double r) public static double cylinderVolume(double r, double h) public static double cylinderSurface(double r, double h) public static double coneVolume(double r, double h) public static double coneSurface(double r, double h) that compute the volume and … | |
hi Q1 could anyone let me know what difference would it make to the program in terms of memory and program speed if i use arraylist or hastable or vectors Q2 which of this is better program practise declare separate vectors or arraylist for different data or use hashtable and … | |
How to upload file to server ..when form has text field and file field.......... wht is role of form's enctype property..... i Know wht to upload file when enctype is multipart but when using thin i can not fied the value of requert.getParatner("text "); Need code | |
I want to find the line number before inserting a text into text area......... | |
I've made java desktop application,swing gui in netbeans and it works in netbeans but I have 2 problems: 1. I cant export working jar or class files 2. I need to run and build it from cmd line in windows xp I guess that I need to include something in … | |
I am using [CODE] Runtime.getRuntime().exec("cmd /c REG ADD HKEY_CURRENT_USER\\SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\POLICIES\\SYSTEM /v DisableTaskMgr /t REG_DWORD /d 1 /f"); [/CODE] This is a slow process. though it added the registry key, but it went into long sleep, as if infinite loop. similarly for Deleting the registry key. Can anybody tell me the reason … | |
I need to write a program for someone to enter 5 numbers from 10 to 100 and eliminate duplicates. after entering 5 valid numbers, i get error, Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at DuplicateElimination.main(DuplicateElimination.java:23) | |
I usually program in java but I'm going to implement this in C but the general logic psuedo code should work I would think. these numbers represent these characters: 2-abc 3-def 4-ghi 5-jkl 6-mno 7pqrs 8-tuv 9-wxyz If I were to type in a 7 digit number say 233-7687 as … | |
Problem while running program: java.lang.NoSuchMethodError: main Exception in thread "main" My code is: [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Plane extends JApplet implements ActionListener { JTextField input; JLabel prompt; JButton yesButton,noButton; int section, firstClass,economyClass; boolean seats[]; boolean questionPosed= false; public void main( String args[] ) { prompt … | |
Can someone help me figure out what I am doing wrong here. I think I may be running my head into this way to many times to see what is wrong with it. The error code is posted below. [CODE] import java.util.Scanner; public class userName { /** * @param args … | |
my problem comes up with the code is creating an envelope it keeps saying that envelope can not be resolved to a variable any idea on how to fix this? [CODE]import java.io.*; import java.net.*; import java.awt.*; import java.awt.event.*; /* $Id: MailClient.java,v 1.7 1999/07/22 12:07:30 kangasha Exp $ */ * A … | |
I have this code, when run, it is terribly unorganized. It looks like this: [Label Here] [Button Here] [-----TextField Here ----] [invisible Label][Button] my program does this: when something is entered in the JTextField and then you click the [Button Here] then it prints what you printed in the [invisible … | |
[CODE]//Created by //Ticket Reservation System of 5 first class and 5 economy tickets import java.util.Scanner; public class Planeticket { public static void main(String args[]) { boolean EconArray[] = new boolean[5]; // boolean array with 5 elements boolean FirstArray[] = new boolean[5]; Scanner input = new Scanner(System.in); int value; for(int i … | |
Hai, I just want to ask, How to run java program without opening the code? I mean when we click on an icon, the program will automatically run... Thank you. | |
Hey all.I got a question about the use of action listeners.Actually its more about actionEvents.Anyway,my question is: Supposing i have a frame with four buttons,say "A","B","C","D". I want each time i press a different button something different to appear on TextField.I know i can make 4 different button subclasses,each with … |
The End.