32,199 Topics

Member Avatar for
Member Avatar for b1izzard

Hi everyone, I had designed an application with Java as front end and mysql as back end. The client application uses both local database as well as Remote mysql server's database for login and other retrievals. I don't know how to generalize the database connectivity code?, I need to access …

Member Avatar for b1izzard
0
226
Member Avatar for mklein

Dear all I am making a program which adds lots of jlabels to a frame (the idea, eventually, is that each jlabel will link to a different program on my dekstop) The trimmed down code below shows that I have a script which creates an array of multiple jlabels which …

Member Avatar for JamesCherrill
0
297
Member Avatar for kukuruku

Hi,I have to write code in java and in the description is this symbol u' Can anybody tell me what is the meaning of it Set (u')

Member Avatar for JamesCherrill
0
74
Member Avatar for breezi3

I need help completing the classes below, I don't think the code I have so far is correct because I keep getting errors. Please help me complete and understand the classes. 1. Create an abstract class named CoffeeOption. This class should have the following components: a. A protected double instance …

Member Avatar for NormR1
0
214
Member Avatar for SMITA6076

[CODE]/*********************************************************************************** * * File: Customer.java * * Author: Austin Smith * * Date: 04/04/2011 * * Description: The Customer class handles all client information * such as name and address. * **********************************************************************************/ public class Customer { /*** Defaults/Constants ***/ public static final String DEFAULT_NAME = "ERROR: Invalid Name"; public static …

Member Avatar for SMITA6076
0
248
Member Avatar for Kprosser1029

Hi I need help creating a word count file, the file should print the name and number of times the words were counted in a file. I need to use the JFileChooser and the results should be printed in the resultArea of the JTextfield. example: and 33 use 24 Here …

Member Avatar for NormR1
0
278
Member Avatar for n3red

Hi, i know how to open a file and read data from it but i wanna print out the number of lines in that file ? How would i go about this ?

Member Avatar for masijade
0
69
Member Avatar for n3red

I wanna know how to print only part of a string. For instance: [CODE] public static void main(String[] args){ String a = "daniweb.com"; System.out.println(a); } [/CODE] I wanna say print only characters after the 4th one so the output would be: [CODE]> web.com[/CODE]

Member Avatar for n3red
0
114
Member Avatar for matadori

I'm trying to program the traditional minesweeper game. I have problems with Swing as I'm not sure how to proceed. I tried adding one JPanel to a JFrame and then using JButtons to imitate the tile buttons. Then I encountered a problem when I tried to program the functionality of …

Member Avatar for JamesCherrill
0
133
Member Avatar for matadori

I'm trying to remove a JButton from a JPanel but my code does not work. Any help is appreciated. This is the JButton. Problem is the line 25 I guess. [CODE] class SquareButton extends JButton implements MouseListener { String text = null; GameArea ga = null; public SquareButton(GameArea ga) { …

Member Avatar for mKorbel
0
2K
Member Avatar for atoivan

1. A PROGRAM THAT PROVIDES THE INTERSECTION COORDINATES OF TWO LINES GIVEN THE COORDINATES OF LINE A AND LINE B. 2. A PROGRAM THAT WILL BE ABLE TO CALCULATE THE GRADIENT/SLOPE OF A LINE GIVEN TWO POINTS. i want to know what i am doing to do, how to even …

Member Avatar for jon.kiparsky
-1
116
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
300
Member Avatar for sj5536

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

0
76
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
97
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
110
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
98
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
209
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
295
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
159
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
320
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
104
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
458
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
508
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
294
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
484
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
61
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
183
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
109
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
253

The End.