32,204 Topics

Member Avatar for
Member Avatar for LianaN

Hi! Could someone please tell me how can I create an obejct of the Class1 shown below? Let's say I want initialize the List of subjects. I try the following code, but it doesn't work: [CODE] List<ClassInterface> myInterface; myInterface = Class1.getAllSubjects();[/CODE] Thanks! [CODE]public class Class1 { public List<ClassInteface> getAllSubjects() { …

Member Avatar for LianaN
0
146
Member Avatar for LianaN

Hi! My question is about JFormDesigner plugin for Eclipse. So, I opened JFormDesigner in Eclipse, added the ActionListener to the JButton and defined a procedure to be runned after pressing this JButton. Then I pressed "Build All" and runned the form (*.jfd file) from Eclipse. However, it seems that the …

Member Avatar for LianaN
0
96
Member Avatar for newbie_vs

hi, anyone can help with the insertion - when insert into a 2-node -> become 3-node, then if insert again in the 3-node, how it will pass/split up the parent - then, when the parent/root become the 3-node,how can it split up again? Below is what i got: [CODE]public class …

0
45
Member Avatar for iraqi4life

There is text file with information held on it, with average rainfall per month. 1914,50.9,87,115.8,32.3,47.1,56.6,97.1,63.9,48.1,62.4,110.3,190.8 1914 being the year and the average rainfall follow it. The year goes up to 2008. I created a enumeration which has Jan-Dec (months) And I need to create a class which will store the …

Member Avatar for iraqi4life
0
180
Member Avatar for filmPC

1.In the Java API, the String class and all numeric wrapper classes (Number, Integer, Float...) are immutable. Name 3 other classes in the Java API whose objects are immutable. Give an example of creating a new object from each class. 2. Name 3 classes in the Java API whose objects …

Member Avatar for apines
0
141
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
395
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

The End.