32,204 Topics
| |
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() { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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! | |
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.. | |
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 … | |
can any body tell me what is basically JVM and for what is it used for.thanks in advance | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| |
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 … | |
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 … |
The End.