35,618 Topics

Member Avatar for
Member Avatar for pradeep_09

How should i handle click events of a JButton array i have frame containing 100 JButtons .I need to find out which one was pressed by the user[code]import java.awt.*; import java.awt.event.*; import java.sql.*; import javax.swing.*; public class Screen1 implements ActionListener , WindowListener { int i; JFrame scrfrm1; JLabel lblscr; JButton …

Member Avatar for n88y
0
196
Member Avatar for fardeenmc

Dear Friends, Please help me in getting out of the below error. I have made attachment of source file, kindly try to execute the program experience the error and guide me. D:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes\com\example\web>javac -classpath " D:\Tomcat 6.0\lib\servlet-api.jar" BeerSelect1.java BeerSelect1.java:3: package com.example.model does not exist import com.example.model.*; ^ BeerSelect1.java:15: cannot find …

Member Avatar for fardeenmc
0
120
Member Avatar for newbeejava

Hi, I am creating a web application. In that I have multiple radio button and two button. What I want to do is-- I want to choose a radio button and according to that value if I will click the button1, I want to display a different jsp page. But …

Member Avatar for Stefano Mtangoo
0
127
Member Avatar for Stefano Mtangoo

Hi All, I have JSP and Servlet that need to "talk" to each other. Actually I need to get record from database, fill it in JSP file. I have created Servlet that does the query and gets the result. I need those results to be shown on JSP file. In …

Member Avatar for Stefano Mtangoo
0
141
Member Avatar for pauloludele
Member Avatar for OffbeatPatriot

As I understand it equal hash codes in general imply a high probability of equality between objects, but they aren't perfect. But I've been told that in Java the base hash code of an Object is simply the memory address of the object, so I've assumed that Object hash codes …

Member Avatar for jwenting
0
294
Member Avatar for cwpent

I understand that this means I'm using more memory than is available to the JVM, but I'm not sure why or what to do about it. The purpose of the program is to simulate an item in a store that is being tracked with a bar code id number (or …

Member Avatar for ~s.o.s~
0
270
Member Avatar for demifuror

Hi Guys, I need some help with a permutation problem. Say I have a string, 6 characters long - "123456" - how can I generate a list of all permutations of that string, limited to 4 characters long? So basically, each permutation generated can only be 4 characters long. As …

Member Avatar for demifuror
0
116
Member Avatar for evak77

I cannot seem to get the array to work and display the second and third loans, only the first one displays. Here is what I need to clarify the situation. Can someone help me out please. Modify the mortgage program again. Remove the amortization table. This time enter 3 different …

0
68
Member Avatar for yeezy_10

help me plz , write a java program that reads a number and verifies if it has the same value when we read it from right to left and from left to right. my program should display "having the same value so it is readable from both sides" if the …

Member Avatar for masijade
0
205
Member Avatar for Hakoo

Hi all, I used [B]Timestamp[/B] data type in mysql and Date object in jsp. Now my question is how can I store system`s current Date n Time in Timestamp field using jsp?

Member Avatar for masijade
0
31
Member Avatar for ku95

Here I have a program and I'm getting the following error ControlPanel is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener public class ControlPanel extends JPanel implements ActionListener ^ I don't fully seem to understand how the best way is to overcome this? [CODE]import java.awt.*; import javax.swing.*; …

Member Avatar for moutanna
0
3K
Member Avatar for ku95

Hi I was wondering if anyone knows why I'm getting the reached end of file while parsing error. It mentions the bracket at the end of the file however when I remove it I get loads of errors. I know that I need to remove it however i dont understand …

Member Avatar for BestJewSinceJC
0
174
Member Avatar for Fou7a

This is a code to solve a maze using A* search algorithm. When I run it, it gives me the following error: Exception in thread "main" java.lang.NullPointerException Can someone help me out? Below is all the code: [CODE] import java.util.List; import java.util.ArrayList; import java.util.Queue; import java.util.PriorityQueue; import java.util.Stack; public class …

Member Avatar for BestJewSinceJC
0
260
Member Avatar for OffbeatPatriot

I'm making a game engine and an integral part of the game is that it populates worlds based on maps loaded from a XML file, a method "Actor load(Map<String, String> code)" in a class ActorLoader takes a map and returns an actor based on this map. When you make a …

Member Avatar for ~s.o.s~
0
179
Member Avatar for grub87

Hi!! I'm using JSP+Servlets+JavaBeans to make a simple application of inventories. I have created some beans in the servlet that contain the name of a factory , and then i want to get that data in a jsp page. Since i'm having many names of factories i named the respective …

Member Avatar for kakashi_sensi
0
155
Member Avatar for ceyesuma

Hello Is there a way to get data from the db with ConnectStudentDAO and populate the StudentBean.java and then copy the bean over to the model (Student.java) Is this how it is done. I'm not sure how to work out the Cast error. Thanks [b]LoginInfoBean.java[/b] [code] public String loginAction(String newUser, …

Member Avatar for ceyesuma
0
127
Member Avatar for ahmedz

hi, i need to to display urdu in java midlets it is showing (?????) signs in database can someone please help me.its urgent

0
23
Member Avatar for InnocentVamp

Hello folks... I want to know how to enable an application (using Java) that it can understand Gujarati fonts? I want to store the Gujarati data and want to retrieve the data with understanding like the occurrence of a given word, replacing a given word with some other word and …

0
48
Member Avatar for gangster88

can someone plz explain why each option is valid or invalid..i have no clue of waht is going on in these questions? all i can see are they are being multiplied?.. i do not understand these attributes and instances and cannot find any helpful resources either? i know in the …

Member Avatar for gangster88
0
107
Member Avatar for jeanfrg

Hi, I need help with an Assignment that requires me to continue(inheritance) on an existing assignment that I previously did. When I run the program and choose option 4 or 5 nothing happens, it skips the rest of the loop and starts again. #This is the main code that uses …

Member Avatar for moutanna
0
140
Member Avatar for prem2

Hi, I want to know the general information about java. Is java is opensource or not? Thank you, Prem

Member Avatar for prem2
0
83
Member Avatar for bettybarnes

hi everyone can u please correct the errors in these codes? [CODE] // Testing the Stack class of the java.util package import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class StackTest extends JFrame { public StackTest() { super( "Stacks" ); Container c = getContentPane(); final JLabel status = new …

Member Avatar for moutanna
0
242
Member Avatar for jasneg16

Please help me out with this... Sorry, Don't know how to post in coding option. this might be hard to understand. | I just copy it and posted it.... thanks in advance. /* * To change this template, choose Tools | Templates * and open the template in the editor. …

Member Avatar for moutanna
0
132
Member Avatar for drweere

please give me a java codes to print this triangula shape using for loop........... 1 22 333 4444 55555

Member Avatar for javaAddict
0
47
Member Avatar for pinsickle

I recently starting learning Java, I have a pretty good grasp on C/C++ and wanted to expand my horizons. Anyway, I have being using the Headfirst Java book and recently finished the chapters on GUI. One thing that wasn't covered by the book was how to deal with child windows. …

Member Avatar for javaAddict
0
114
Member Avatar for pateldeep454

What are the pros and cons of class and object methods? Which is more concise (usually)? What kind of computations can be expressed most naturally using each style)? Explain PLZ!!!

Member Avatar for quuba
0
89
Member Avatar for ku95

Im trying to call the reset method within this Connect4Model class is that possible. As you can see I have made and attempt and I'm getting 33 errors. I can't exactly see where I'm going wrong. If someone can guide me and let me know where I've gone wrong that …

Member Avatar for quuba
0
109
Member Avatar for ku95

Hi, I have some code for a program that I'm doing. Basically I'm trying to write method whereby the reset() method takes two parameters which are number of columns and number of rows. I'm doing this method whereby I have to to move all the contents of the Connect4Model constructor …

Member Avatar for quuba
0
108
Member Avatar for ku95

I'm new to doing Java and i was wondering if anyone would happen to know why this return type error is occurring. this is the following error C:\Users\..\Desktop\Connect4Model.invalid method declaration; return type required public reset(int numCols, int numRows) [CODE]public class Connect4Model { Connect4Column [] columns; // an array of columns …

Member Avatar for wildplace
0
227

The End.