32,199 Topics

Member Avatar for
Member Avatar for TrustyTony

This code is giving minimal change from real Python class to JavaMonster with every method having setter and getter not following the PEP8 naming but capitalizedWordsFormat. When instrunctor turns his head or if you put the code in your library, you can simply remove the setter/getter lines.

0
259
Member Avatar for neo_31591

A little help guys i have a JButton..i wanna use it to repeat the SQL statements but with an updated value.... my JButton reads [code] if(ae.getSource()==b1) { v1=v1+2; System.out.println(v1); } [/code] v1 gets a new value everytime i click the button and the v1 is used here ...under public static …

Member Avatar for JamesCherrill
0
77
Member Avatar for Sunshineserene

Hi all, I'm actually equating a 2D array from a class to another class. I call it using method call. However, it seems like the 2D array is empty after I equate it to another 2D array in another class. May I know where is the problem? [CODE]import java.io.*; import …

Member Avatar for apines
0
239
Member Avatar for neo_31591

hey guys... my database consists of questions...for a quiz....i need to read the question so that its displayed into the JLabel... [CODE=JAVA] //package Proj; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; class Testpage extends JFrame implements ActionListener { public static String usr; JMenuBar mbr; JMenu File,Help; JPanel p1,p2; JLabel …

Member Avatar for neo_31591
0
2K
Member Avatar for sirlink99

I am wondering how to make the red aquare jump around in the script. This is a menu. I would like the red squareto jump around every 1 or 2 seconds (doesn't have to be exact). Right now I have it when someone moves the mouse but I woule like …

Member Avatar for kramerd
0
152
Member Avatar for o0oKodako0o

I use: [ICODE]Integer.toBinaryString(number);[/ICODE] to get binary string. I want to get the sum of two binary number. how do i do? example: 0010 + 0011 = 0101! Thanks! smb help me please!

Member Avatar for apines
0
116
Member Avatar for rayden150

Im making a simple program to for a bank (its a course exercise), but i want to know how do i save for example a costumer data like Strings...?... any suggestions, please and thank you..

Member Avatar for kramerd
0
110
Member Avatar for banana1073

For my Computer Science class, we are writing several different methods to reverse a singly linked list in Java. I cannot figure out the last way, which uses three helper methods, pointerToLast(Node n) which returns the tail node, nextToLast(Node n) which returns the second to last, and append(Node a, Node …

Member Avatar for jon.kiparsky
0
202
Member Avatar for extemer

can any body tell me what is basically JVM and for what is it used for.thanks in advance

Member Avatar for Dhruv Gairola
-1
114
Member Avatar for Zibo

Hello! Here's the problem: After making some GUI application (NetBeans) in output directory (containing generated .jar file) also appeared a directory 'lib' with additional .jar. This jar is some extra library with classes, which path is added in manifest ("Class-Path: lib/bla.jar"). So I've used to pack my applications always intto …

Member Avatar for Zibo
0
183
Member Avatar for crenfrow

This is probably very simple but i'm not seeing how to do it. My GUI for a project reads objects from a flat file (substitution for database) and puts each object as an item in a jComboBox. Then if the user wants to delete one of the objects, he selects …

Member Avatar for hanvyj
0
1K
Member Avatar for 080346

i have written the following code, my 1st combo box getting the write data but when i have problem in the getting the data in 2nd combo box when i select from the 1st one....kindly help me....advance thnx for answering String obj =(String)jComboBox1.getSelectedItem(); res=stat.executeQuery("Select flight from main where Route="+obj); String …

Member Avatar for hanvyj
0
72
Member Avatar for VAISHALI THAKER
Member Avatar for masijade
-5
60
Member Avatar for 080346

I have created two select list (Combo box). BankName and BranchName. BankName is using LOV with query to display bankname. This is working fine. Now when i select Bank name i want to display selected branches of that bank in Branchname combo.How to display values in second combo basis on …

Member Avatar for hanvyj
0
286
Member Avatar for divyakprabh

Hi, I have two applications which uses the same class that gives cpu information using sigar api. Both the applications are deployed in a same JBoss instance. When i try to start the application, first application gets deployed with no errors while for second application i get an error saying …

Member Avatar for divyakprabh
0
126
Member Avatar for printmatic

Ok so I wrote this with some help of a friend and it compiles fine and everything, however when I try and run it I get this error message. "Static Error: No constructor in Day matches this invocation Arguments: () Candidate signatures: Day(int)" I am not sure what this means …

Member Avatar for apines
0
748
Member Avatar for Eric Cute

Can anyone pls suggest if there exist a java IDE that has drag and drop functionality in creating GUI's?? Much like the VB.NEt IDE's. Thanks (",)

Member Avatar for RushabhShah1110
0
174
Member Avatar for fahadyousaf

You are required to develop a simple GUI application for the registration of voters. Your code should take data form user into text fields and save it into a text file. You will make voter class and a GUI. The Voter Class must have following attributes: • National ID Card …

Member Avatar for Dhruv Gairola
-1
84
Member Avatar for sirlink99

I have started making a calculator. There are buttons and a screen where the numbers should how up. Except I dont know how to program the larger numbers so when someone types in a '5' then a '2' then a '7' the number becomes 527 instead of a 5 then …

Member Avatar for coil
0
195
Member Avatar for Beornhelm

New to the forums and could use a hand. I am completely stuck, and not sure what to do at this point. I keep getting "TRACE: <at java.lang.IndexOutOfBoundsException: Empty field: 106>, Exception caught in Display class java.lang.IndexOutOfBoundsException: Empty field: 106" during run-time when the method, displayList() is called (currently on …

Member Avatar for Taywin
0
388
Member Avatar for jFincan

Hi, firstly my english is not very good so ım sory about that. ı want to parse a web source. ı got the source code with urlconnection in jTextArea but ı cant get between two html tag for ex. <p class="asd">asdasdasdas </p> <p class="asd2">bdfgfdgdfgf </p> <p class="AltBaslik">I want to this …

Member Avatar for Taywin
0
102
Member Avatar for orkuncanbay

I am in search of an online exam program which is to be uploaded on my web-site for my project. However, there will be four levels according to which the questions will be grouped. This application should read questions randomly from a list of questions stored in database. This application …

Member Avatar for Eric Cute
-1
69
Member Avatar for shelexelex
Member Avatar for jon.kiparsky
0
89
Member Avatar for sirlink99

I am in a java programming class but my teacher doesn't teach anything so could someone please explain to me how to import a picture into the applet and give me an example of a simple script that just imports a picture. I have learned how to use the mouse …

Member Avatar for kramerd
0
215
Member Avatar for akinfemi

import acm.graphics.*; import acm.program.*; public class BlacknWhite extends GraphicsProgram { public void run(){ GImage image = new GImage ("akinfemi.jpg"); GImage grayImage = createGrayScaleImage(image); add(image, 10, 50); add(grayImage, 100, 50); } private GImage createGrayScaleImage(GImage image){ int [][] array = image.getPixelArray(); int height = array.length; int width = array[0].length; for (int i …

Member Avatar for kramerd
0
106
Member Avatar for optikali

Java n00b here. I am putting together a little random number game and am having trouble with my loss condition test. It seems like Java does not like casting ints as a bools. Here is my code so far: [code=java] import java.util.*; public class TwoRandom { public static void main …

Member Avatar for optikali
0
179
Member Avatar for BLUEC0RE

I am looking to make my code more abstract so I dont need to repeat the same code. I am storing objects two different classes in the same arraylist. When searching, I need to check ahead of time to see if the entry in question is of a certain class …

Member Avatar for BLUEC0RE
0
139
Member Avatar for hwalsh

Hi all! I'm new to Java, so please bear with me. I'm trying to calculate the average of grades input by the user. I keep getting a exception saying that it's dividing by 0. I can't figure out why. [CODE]import java.util.Random; import java.util.ArrayList; import java.util.Scanner; public class Average { // …

Member Avatar for Overbooked
0
2K
Member Avatar for Pushpasheela
Member Avatar for jon.kiparsky
0
186
Member Avatar for caswimmer2011

Hey, I'm making a password program for my programming class. If the user doesn't get the password correct in 10 tries, then it says "Your hard drive is erased". (Obviously, it isn't erased). I've been looking for a code to end all programs running and close down everything and can't …

Member Avatar for haranaboy
0
155

The End.