32,204 Topics

Member Avatar for
Member Avatar for namratakakkar84

Hi I have made a program in which a servlet page is called by html page. The problem is that whenevr control goes on to servlet page it shows that the servlet page does not exist. I am deploying my application on tomcat and I am using MS-ACCESS as database. …

0
57
Member Avatar for chuppy

hi guys..i need help with my assignment..hpoe u can help\ A credit card company charges its customers monthly interest for any unpaid balance. Assuming that you owe the credit card company some money, you have decided to stop using the card and to pay off the debt by making a …

Member Avatar for ithelp
0
67
Member Avatar for mithunthakkar

hey friends, im getting this error illegal state of expression plz help me wid this Connection db = DriverManager.getConnection(connectURL); Statement stmt = db.createStatement(); String c = request.getParameter("criteria"); String a = request.getParameter("value"); ResultSet rs; if(c.equals("BillNo")){ --error-- rs = stmt.executeQuery("select * from orders where billNo="+a+); }else if(c.equals("UserId")){ --error-- rs = stmt.executeQuery("select * …

Member Avatar for mithunthakkar
0
131
Member Avatar for idgirl

on line 40 I have: public void start That is the only thing that is showing something wrong. I have addad, curly brackets with no luck and when I put a semi colon at the end everything after it shows an error. The programs opens the applet but does not …

Member Avatar for VernonDozier
0
112
Member Avatar for tomo_uni

I am writing a seprate driver class for my programme, but I need to know how to add two panels to the jframe. Any one help?

Member Avatar for sneaker
0
212
Member Avatar for tomo_uni

How do i create a array of 100 JLabels (all of them being the colour blue) and then insert them ALL into a seperate JLabel? Tom

Member Avatar for Ezzaral
0
50
Member Avatar for latinajoyce

i have to code a program that ask for the user to enter a positive integer and then I have to find if the value that was enter is divisible by 11 (with no remainder) and display "yes" if it is divisible and "no" if it is not. <<My program …

Member Avatar for latinajoyce
0
95
Member Avatar for TheWhite

[CODE=JAVA] String line = "Extracting from E:\\Junk\\morejunk\\file.txt"; System.out.println(line); //prints: Extracting from E:\Junk\morejunk\file.txt String[] splitPath = line.split("\\"); //exception thrown here String folder = splitPath[splitPath.length-2]; System.out.println(folder); [/CODE] [QUOTE]Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Unexpected internal error near index 1[/QUOTE] My objective is to always print the folder containing the file being extracted (morejunk …

Member Avatar for quuba
0
1K
Member Avatar for nonhlah

I need help , I want to save article in the database but i cant read the text from the file to the database where i have a body column for the content of that article Plz help my assignment is due on monday , by the way I am …

0
63
Member Avatar for jooa

Hi, I have written some code which when a mouse is clicked, a red circle is drawn at that position. The x,y coordinates are stored in an ArrayList. What I now want to do is enable the circles to be selected and then dragged. When the mouse is released the …

Member Avatar for jooa
0
2K
Member Avatar for jooa

I have written a program which allows the user to click on the screen which draws a circle and when the user clicks on the circle again they can drag it around. My code allows the circle to be dragged it still displays the original cirlce and draws the path …

Member Avatar for jooa
0
1K
Member Avatar for jooa

I am implementing an FFT class. I get the pixel data from an image then pass this to the FFT class. Once I apply the fast fourier transform to the array the result is an array of complex numbers. At the moment I convert the array of complex number to …

0
70
Member Avatar for idgirl

I am very green at writing Java, I am trying to go through our chapter examples and putting in data for a mortgage calculator with a GUI. This code is far from finished but the example says "Now save and compile" and this is where I am getting the error …

Member Avatar for idgirl
0
148
Member Avatar for Laidler

Ok in my program i'm trying to prevent a user from adding too many objects. i have three arrays called subs airs and dests, the user shouldn't be able to have more than a total of 10 objects between them. in order to add an object to an array the …

Member Avatar for Laidler
0
138
Member Avatar for Xessa

Hello. I have a PreparedStatement/CallableStatement, a ResultSet and a Connection... Now after execution finishes, i want to release my resources. First I close my connection... I also want to release my ResultSet and my PS Will assigning null to my Connection object after closing the Connection object also assign null …

Member Avatar for JamesCherrill
0
367
Member Avatar for chingkoysilog

[code=cplusplus]#include <iostream> using std::cout; using std::cin; using std::endl; using std::ios; #include <iomanip> using std::setiosflags; using std::setprecision; using std::setw; int main() { const int PEOPLE = 5, <strong class="highlight">PRODUCTS</strong> = 6; double sales[ PEOPLE ][ <strong class="highlight">PRODUCTS</strong> ] = { 0.0 }, value, totalSales, productSales[ <strong class="highlight">PRODUCTS</strong> ] = { 0.0 …

Member Avatar for javaAddict
-1
191
Member Avatar for beanboy

chunk of code... [CODE] public void init(ServletConfig config) throws ServletException { Map map = new HashMap(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); [U]map.put("one1","two2");[/U] [/CODE] compiler says 'map' cannot be resoled......why so? wht shd i do? thanks, BeanBoy

Member Avatar for beanboy
0
93
Member Avatar for beanboy

hi helper, i'm trying userlogin web app....where logged in user ID's are sent to a hash map .....so that admin can view logged in users list... my problem is... hash map is creating new map (which replaces the old map) when ever a user logs in.... so admin is able …

Member Avatar for beanboy
0
122
Member Avatar for rajachandra

hello , can you tell me how to delete the previous contents in the file,while adding new contents in java????

Member Avatar for javaAddict
0
107
Member Avatar for nccsbim071

Hi, i successfully created the JAVA Applet and embedded it in the HTML page. The applet class is as follows: [code=JAVA] import javax.swing.JApplet; import java.awt.Graphics; public class HelloWorld extends JApplet { @Override public void paint(Graphics g) { g.drawRect(0, 0, getSize().width - 1, getSize().height - 1); g.drawString("Hello World !", 5, 15); …

0
61
Member Avatar for nccsbim071

Hi, I am new to java programming. I have been creating a simple applet. Which is as follows: [code=java] public class HelloWorld extends JApplet { public void paint(Graphics g) { g.drawRect(0, 0,getSize().width - 1,getSize().height - 1); g.drawString("Hello world!", 5, 15); } } [/code] This code is saved in a file …

Member Avatar for nccsbim071
0
176
Member Avatar for shockwave_05

Use a two-dimensional array to solve the problem. A company has four sales people (1 to 4) who sell 5 different products (1 to 5). Once a day, each sales person passes in a slip for each type of products sold. each slip contains: a. The salesperson number b. The …

Member Avatar for chingkoysilog
0
2K
Member Avatar for get2tk

pls i need to change the image on a Jlabel to another image when a user inputs a string word "change". How do i go about it?

Member Avatar for and12
0
81
Member Avatar for gowth08

hi people...was working with hashtable's.... code is as follows : [CODE]public class X{ int a; int b; X(int a, int b){ this.a = a; this.b = b; } public static void main(String a[]){ Map map = new HashMap<X,String>(); map.put(new X(1,2),"some value"); System.out.println(map.get(new X(1,2))); } }[/CODE] gettin o/p as null...is there …

Member Avatar for CrazyDieter
0
91
Member Avatar for and12

The assign was a game called FortuneCity The prof wanted us to follow the MODEL - VIEW - CONTROLLER implemention. The MODEL contains only functions that can be used in the game. It has NO GUI stuff in it. The VIEW contains only contains the GUI interface. The CONTROLLER allows …

0
61
Member Avatar for akulkarni

i tried the following code but not getting the desired output. I need to extend Applet class along with dialog class.how do i do that? [code=JAVA] import java.awt.*; import java.awt.event.*; import java.applet.*; /*<applet code="YesNoDialog" width=400 height=400></applet>*/ public class YesNoDialog extends Dialog implements ActionListener { private Button yes=new Button("Yes"); private Button …

Member Avatar for quuba
0
131
Member Avatar for Laidler

i am currently working on a GUI for a program. i have created 100 jpanels which i have set opaque and colored blue. All of these blocks get an error which says that an identifier is expected for the lines which set them opaque and colors them, heres an example: …

Member Avatar for Laidler
0
89
Member Avatar for Zibo

Hello. I'm trying to write an application, which after pressing a key does a particular action. The thing is I need the application to receive key events even if JFrame isn't itself focused (is iconified). I've read somewhere that it cannot be done - is that true? If it is …

Member Avatar for quuba
0
2K
Member Avatar for JameB

Hello, I am new to Java programming and I just got the NetBeans IDE. One problem that I've been having with Java is the input. [code=java] package learning; public class Main { public static void main(String[] args) { int num1 = 0, num2 = 0; cin >> num1 >> num2; …

Member Avatar for JameB
0
149
Member Avatar for ChiboSempai

So I'm working on a GUI program in Java, and I'm having problems dealing with some text fields i have. The text fields are resizing themselves the same size of the window, making them much larger than I wish. [IMG]http://i6.photobucket.com/albums/y201/ElChibo/tioex-2.jpg[/IMG] I would like all of the text labels to be …

Member Avatar for BestJewSinceJC
0
124

The End.