36,051 Topics

Member Avatar for
Member Avatar for faithingod1970

I once upon a time had problems with buttons and getting windows to show up, now cannot get output of loan data into JList, code is below, any suggestions? next change is to add array (which I think I can do) and graphics in the form of a graph but …

Member Avatar for NormR1
0
309
Member Avatar for sj5536

hi , can any one suggest mw which book is good for j2ee i am good in core java

0
78
Member Avatar for bhdas1

Hi, I have developed a Java swing based application to work in Windows 7 platform. But the application is having some issues as below : 1. I have a few tabs labeled like A , B , C ,D side by side in my application. If I am using jre5 …

Member Avatar for mKorbel
0
98
Member Avatar for leeRH

Hi I'm new to JSP and am having a right battle with session scope. Here's what I'm doing: I have created a class with some variables and methods. As I want to be able to access the contents of my created object in other pages, I have instanciated my class …

Member Avatar for kumarvishal_vk
0
309
Member Avatar for isengwa

wat's guys? i have a java program and i want to connect it with mysql,how can i get my prob solved?or if i can view any source code that can help me.

Member Avatar for sam.udo
0
114
Member Avatar for man in a can

Hi Folks, So the problem im having is trying to make some code less clunky. I recieve a list of random codes in the form of an Enumeration. I then retrieve a number of codes i read in from a properties file going from most important at the top to …

Member Avatar for JamesCherrill
0
102
Member Avatar for Jimmyteoh

[CODE=java]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Plane extends JApplet implements ActionListener { JTextField input; JLabel prompt1, prompt2; JButton yesButton, noButton; int section, seats[], smoking; int nonsmoking, people; public void init() { input = new JTextField( 4 ); input.addActionListener( this ); prompt1 = new JLabel( "Please type 1 for …

Member Avatar for Nick Evan
0
212
Member Avatar for Glanet

hi i have validated some fiels in jsp using useBean . But am nt able to get the values into another page.can anyone help me.This is my code. jsp file [CODE] <%-- Instantiate the form validation bean and supply the error message map --%> <%@ page import="com.mycompany.*" %> <jsp:useBean id="form" …

0
56
Member Avatar for theinvincible

I am having some problems with simulating POisson arrivals and departures in Java. I want to simulate 400 cars/hour as arrival rate and 20 cars/hour as departure rate. I have a parking capacity of 500 cars where these cars enter/exit. When I am checking occupancy values, even after a couple …

Member Avatar for peter_budo
0
302
Member Avatar for Mr.Barca

Hi everyone I have a question and I need your help I want to sort an array but I dont want to change the index I mean if I have an array F[6,5,4,3,2,1] it will be like this 0 6 1 5 2 4 3 3 4 2 5 1 …

Member Avatar for bibiki
0
161
Member Avatar for 24x24

OK I have yet another homework problem. Again, help me by teaching, not writing my code for me. I have looked through the pages of threads on collision detection and found nothing to answer my question. My issue is that I have a collision detection method that should (in theory) …

Member Avatar for 24x24
0
327
Member Avatar for Mbot

Hey, We got an assignment to host a website, our members must be kept in a mySQL database. I honestly have no idea where to start. If you could just help me with the basics steps. Ill research the details myself. Here's what I've done so far. 1.I downloaded and …

Member Avatar for cheelee
0
220
Member Avatar for saurabh2007

I am new to java and have been working on a project. The project involves two files: One with student ID numbers and their answers for 10 different questions. The second file contains a bunch of ID numbers from the first file. The second file has id numbers for a …

Member Avatar for NormR1
0
108
Member Avatar for SMITA6076

I have a 3x3 array of [ICODE]MSTextField[/ICODE] which is a class I created which extends [ICODE]JTextField[/ICODE]. I'm trying to set all of the text fields to display the empty string ([ICODE]""[/ICODE]). My problem is I'm getting a nullPointerException at the end of the method which is supposed to do this. …

Member Avatar for SMITA6076
0
463
Member Avatar for tracydo

Hi, I need help with some small exercises. I'll try my best to provide my code but these are ones that I don't know how. So... maybe you can help me with yours! Thanks 1. Question 1: A program contains the following method definition: [CODE] public static int cube(int num) …

Member Avatar for SMITA6076
0
512
Member Avatar for OnnDay

Hi everyone. I'm using Tomcat 7.0.8 I have created servlet, which loads image to "webcontent\pic" folder of my project. Then I need to display this image. The servlet works, but with only restriction: i need manually refresh content of project, or directory (I'm using Eclipse). Otherwise ugly cross will be …

Member Avatar for OnnDay
0
170
Member Avatar for pseudorandom21

Is there a decent IDE for Java? Meaning, one that you don't think will end up making me rage and have annoying features that get in the way all the time making it unsuitable for development? What is the best IDE performance wise?

Member Avatar for peter_budo
0
302
Member Avatar for anandhikrishnan

Hi All, I have three combo boxes in a jsp file in a form. After i select valus for the three combo boxes I click search button which is a submit button, on submit the corresponding action file is called, there I can get the values by request.getparameter("name"); I just …

Member Avatar for javaAddict
0
96
Member Avatar for smitdog1

Is there a cleaner way to close out of a GUI window in Java then just clicing the X in the upper right hand corner? When I do this I get a NullPointerException error. Is there a way to put an "Exit" button in a GUI window so that the …

Member Avatar for javaAddict
-2
500
Member Avatar for AnkitKumar

class A { int add() {} } class B extends A { int add() {} } class C extends B { i want to call here A's class method add using A a=(A)this; t.add(); it is possible or not } class D { C c=new C(); }

Member Avatar for masijade
0
64
Member Avatar for mipatel

i dont know how to get the image and how to store the image in the database plzz give me the complete example so i can complete my project plzz help me my project external submission date is near plzzz plzzz help me anyone

Member Avatar for peter_budo
0
186
Member Avatar for arshi9464

i making a system, in which at max 10 users can login and work independently. But the problem is that when a user logs out, i am just redirecting him to the login page, i want to end that session, so that IF HE CLICKS ON THE BACK BUTTON, HE …

Member Avatar for javaAddict
0
83
Member Avatar for private_class_J

[code]textPane = new JTextPane(); textPane.setBounds(337, 33, 290, 198); textPane.setBackground(Color.LIGHT_GRAY); textPane.setEditable(false); textPane.setLayout(new GridLayout()); JScrollPane scrollPane = new JScrollPane(textPane); scrollPane.setBounds(337, 33, 290, 198); add(scrollPane); searchButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { List<MainManagement> sList = new ArrayList<MainManagement>(); MainMngDao mmd = new MainMngDao(); sList = mmd.search(); for(int i = 0; i < sList.size(); …

Member Avatar for mKorbel
0
111
Member Avatar for liphoso

Hw do i reverse the mod function. That is: 6 mod 2 is 0. Nw hvn my result 0, dnt knw wat 2 is cald in dis case bt i got it as wel. Hw do i get bak to 6. 6%2 = 0. Hw do i reverse dat. I …

Member Avatar for masijade
0
3K
Member Avatar for dante5458
Member Avatar for omar mazen
0
256
Member Avatar for sam.udo

i'm designing an application as a project work in my school but i'm hooked,i need help on how to upload a picture from a folder or directory via a JButton,though i can do that with PHP but not with java....THANKS

Member Avatar for NormR1
0
67
Member Avatar for makmuhefe

Hello, Im trying to write a program which is computing surface area of a 3D geometry by using Newell Methods. Geometry data should be reading from a text file. The lines which has 3 columns point out coordinates of geometry's vertices. The lines which has 2 columns point out connectivities …

Member Avatar for makmuhefe
0
240
Member Avatar for mipatel

i want insert and retrieve image from the database using jsp i see many example but in every example gives default path like ("c:image.jpg") but i want to insert image using <s:file> tag in struts2.0 in database so plzz help me i have exam in few days and i want …

0
61
Member Avatar for AnkitKumar

i want to call there A's class constructor using "super" keyword how it is possible help me plz.....[code]class A {} class B extends A {} class C extends B { i want to call here A's class constructor using "super" keyword how it is possible help me plz..... } class …

Member Avatar for stultuske
0
350
Member Avatar for kubiak

`private static final Font FNT_GIVEN = new Font("SanSerif", Font.BOLD, 20);` I want to put the color for this font for example red, can someone help me??? I am working in awt.

Member Avatar for kubiak
0
95
Member Avatar for CrazyPixel

Hey guys, Here's my problem: I developed some code that converts binary to characters and characters to binary. At first all went well (by first I mean on the good ol' console), but when i tried implementing a GUI, some weird stuff came up. When I try converting characters (strings …

Member Avatar for NormR1
0
161
Member Avatar for Krazykado

Hello, I am having a problem putting this Array's output in a single GUI window. When I receive the output it just shows the grades in individual GUI windows (IE Erik 98 [OK], Fred 76 [OK], etc). If I put the output outside the loop then it doesn't recognize grade[i]. …

Member Avatar for JamesCherrill
0
137
Member Avatar for persianprez

Hi guys, I am in desperate need of help. I'm not exactly sure how to fix this or how to pass contentpanes correctly. Here is my code for gameboard.java: [CODE]import javax.swing.*; public class GameBoard implements ActionListener { private int[][] winSlots = new int[][] { {0, 1, 2}, {3, 4, 5}, …

Member Avatar for JamesCherrill
0
137
Member Avatar for arshi9464

i have made a jsp page, in which:- 1) I HAVE CERTAIN TEXT FIELDS 2) AN OK BUTTON 3) A GENERATE BUTTON. The problem:- When i click on generate button, info from database should get filled in the textfields. How can i do this?

0
89
Member Avatar for stephen lynch

hi everyone where did i go wrong with the {} please help. import javax.swing.JFrame; // import JFrame class import javax.swing.JLabel; // import JLabel class import javax.swing.JPanel; // import JPanel class import java.awt.Font; // import awt Font class import javax.swing.border.Border; // import Border interface import javax.swing.BorderFactory; // import BorderFactory class import …

Member Avatar for Dxpat4real
0
230
Member Avatar for tultul

hello everyone! i need to create setup for my java swing desktop application. I have searched in google and found a software to create a setup file. it is called INNO SETUP. But i tried to use it and but no any succeess. please help me in this regard. please …

Member Avatar for JamesCherrill
0
233
Member Avatar for liphoso

I expected the program to update the original array but it seems to update the array that has been sorted. i tried to copy array but it does not seem to help me. how do i make sure sure that the array that is updated is the original array. Desired …

Member Avatar for jon.kiparsky
0
172
Member Avatar for Diogo Martinho

Hello, I am currently trying to work on a project, however I will not ask for any sort of Coding since I want to implement that myself. I am working on a project in which I deal with various contracts and I have to [B]keep updating the total price of …

Member Avatar for JamesCherrill
0
109
Member Avatar for alabn22

Hi, I`ve just started working on my diploma thesis project which is "building a door access control system". Mainly it will work like this: there will be a java server, a database and clients(which will simulate the access cards at the doors) Since i don`t have the possibility to use …

Member Avatar for alabn22
1
130
Member Avatar for Dean_Grobler

Hey there, I'm stuck in a rut at the moment trying to figure something out. I have a class, that has 4 methods. method1(), method2(), method3() and whatMethod()... whatMethod() accepts a String and then decides what method to execute based on the received String. Say the String that was sent …

Member Avatar for JamesCherrill
0
290
Member Avatar for NPDA

String ipAddress = new String (pktIn.getData(),0,pktIn.getLength()); what the mean of this sentence??

Member Avatar for NPDA
0
91
Member Avatar for tultul

Hi..! i just started a new thread to draw attention. I asked earlier about how to make a trial period software in this forum and the link is.... [url]http://www.daniweb.com/software-development/java/threads/363496/1557768#post1557768[/url] i found the solution of using Rampart, but i have to purchase it to fully use it. Now can we use …

Member Avatar for tultul
0
143
Member Avatar for butz17

Hi guys! i need some help with my program and i cant determine what to do next...i'm making a program that will output the longest word in a sentence.. here is my code... [CODE] import java.util.Scanner; class LongestWord4 { static Scanner console = new Scanner(System.in); public static void main(String args[]) …

Member Avatar for butz17
0
2K
Member Avatar for jackmaverick1

Hi! I need to know how to make global object from a local place like a function. And of course, they need to have unique names each time the function is run Could I somehow pass the a String parameter of the function to the name of the new object? …

Member Avatar for jackmaverick1
0
223
Member Avatar for newbie14

Dear All, Below is my java codes. Currently the codes gets data from gps devices. The problem now if you notice is that I have to send twice the acknowledgement message that is w.write("$PA\n"); w.flush(); once in line 56 and 57 and once more in 85 and 86 then only …

Member Avatar for NormR1
0
182
Member Avatar for sirlink99

I have this part of my code. I have a JLabel and a JButton that are in a panel. The I place that panel into another panel that has a border layout and I set the panel containing the label and button to be "NORTH", but the JLabel does not …

Member Avatar for Ezzaral
0
934
Member Avatar for muloki

hi I'm writing a small game and need to pass an image into an ArrayList. The Image and bounds are set in Attacker Class with an ArrayList partially constructed in my GameScrn Class posted below. Have spent 2 days on this one issue and failing badly...guessing as usual, im missing …

Member Avatar for mKorbel
0
2K
Member Avatar for Princess90

What purpose does the main method serve? What code should you, and should you not, put in the main method? Brief description of DIP , Factory method pattern and OCP in java terms.

Member Avatar for Ezzaral
-2
123
Member Avatar for gingerfish

how to find out whether certain elements in an array are equal to one another? for this array: [icode]int array[] = {0, 1, 0, 0, 2, 0, 0, 3, 0, 1};[/icode] i wanna know if elements under the indexes 0, 1, and 9 are same numbers well the easy way …

Member Avatar for NormR1
0
212
Member Avatar for M!ss Takishima

Hello, I make a program loop..but it doesn't work as i want ><" ! this is the OUTPUT -look careful, please- : [CODE]Welcome to our miniCalculator if you want to use add, enter add if you want to use subtraction, enter sub if you want to use division, enter div …

Member Avatar for M!ss Takishima
0
176

The End.