32,204 Topics
| |
Hello to everyone and happy new year... I have 3 JRadioButtons in my JFrame [CODE]private JRadioButton one = new JRadioButton("one "); private JRadioButton two = new JRadioButton("two "); private JRadioButton three = new JRadioButton("three ");[/CODE] And I Have add them to a group [CODE]private ButtonGroup Group = new ButtonGroup();[/CODE] [CODE]Group … | |
A jar or exe file [Java App], may contain images etc files inside one file the file.jar or file.exe? In NetBeans and Eclipse, how do this one file [jar] or an file.exe containing All files of the IDE's wanted Project? | |
Hey everyone and happy new year. I'm a java beginner and I am doing my first program, a dvd rental system. I've got 4 classes with the following variables: the main class the dvd class - dvdID, title, rating, producer the cleint class - cleintID, name, surname, address the rentals … | |
I HAVE DONE CORE JAVA , AND WANT TO MOVE TO ADV.JAVA . BUT IN CLASS AS ADV.JAVA THEY STARTED EJB (ENTERPRISE JAVA BEAN) IT BIT HARD TO UNDERSTAND . SO HAVE I MISSED ANY STEP??? OR ANYTHING SHOULD BE DONE BEFORE MOVING TO eJB??????? plz adviCE ????????? AND HOW … | |
hello all i have a directory in which a lot of log files are there which are text files.i want to search a particular no in all logs and want 4 fields of logs corresponding to that no. for tht i am using a script in which i am cutting … | |
I was trying to find the smallest common divisor for the numbers from 1 to 20. I tried the following code. My problem was how to get back to the beggining of the for loop after the if test has found the number is not divisible. But then i added … | |
I'm trying to make it so when I press ESC, it RestoreScreen() but it doesn't work. Now I don't know whether it's my method RestoreScreen() or my listeners. This is my code: [code]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class main extends JFrame implements MouseListener,KeyListener{ public void keyPressed(KeyEvent e) { … | |
I'm reading a book called Beginning Algorithms by Harris and Ross, which gives code examples in Java. As an academic exercise I am trying to convert the code examples to C++. In the interface below the part that throws me is the return of the 'Object' by the 'current' method. … | |
hello all, this is my first post here and I have searched for answers elsewhere before asking for help. My code is pretty tight, but I keep coming up with symbol not found errors. Are my curlys not in the right place? Or have i not declared the objects correctly. … | |
Hi I'm new to programming so I need a little help with packages. I have created 2 packages test1 and test2 with p1.java and p2.java respectively. Both have default access. I'm trying to extend p1 with p2 and have tried to import test1 but the error im getting is that … | |
could u tell me plz how we can Radio Button in different location as wel as in image atachment. | |
I understand that int values, when autoboxed, are interned i.e no 2 objects containing the same int are present, and so we can compare two Integers by == So why does the following happen :[CODE]Integer iRef1=1000; Integer iRef2=1000; System.out.println(iRef1 == iRef2); System.out.println(iRef1.equals(iRef2));[/CODE] This prints [CODE]false true[/CODE] On the other hand, … | |
Why do local inner classes not allow static variables ? The static fields of the classes could at least have been allowed access from the local method ? | |
public class Account extends javax.swing.JFrame { /** Creates new form Account */ public Account() { initComponents(); setTitle("Bank Account"); jTextArea1.setEditable(false); } /** * @param args the command line arguments */ private int accountNumber =0; private double balance =0; public Account(int accNum, double bal) { accountNumber = accNum; balance = bal; } … | |
hey, i got a method that returns value which is java.util.List<java.lang.String>. this method actually contain data that was stored from .txt file which is simply names of people. how can i display this in the JList or how can i convert this value to a simple array so later i … | |
Can anyone please explain what is 'public' and 'private' in oop and specifically in java? I am a bit confused. | |
Hi everybody, actually i am new to Java, and i would like to write a program that to find who is a copycat, for example, i get six txt file, all of these are juz put inside a folder, i guess i should get all the txt file to array, … | |
Hi to all I have one question about error in my code.. If I have compile the code in the NetBeanse , not found any error .. but if compile it in Command Line, I have errors. I attached my post with the code and 3 picture of run include … | |
I got that code from [URL="http://www.javafaq.nu/java-bookpage-19-3.html"]here[/URL]. Everything's working except the balls! There is panels, splitpanes etc. Oh Look, no balls! I need to solve it like in an hour. Please help. I say again; please... [CODE]import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.event.*; public class Split … | |
Hey guys im getting back into Java after a break from programming. And i was wondering what is the best integrated development environment for running java.Im sure there is no one Best, but your input would be greatly appreciated. | |
Does anybody know any good tutorials on how to make a web crawler in Java. All I can find is a bunch of code that you have to figure out own your own! I am pretty new to the forums, and have a pretty good experience in java. So..... Any … | |
Im new to java and I would like to participate in some small projects.. let me know and I'll be glad to work with yha.. | |
Create a JAVA applet program that accepts and displays object‟s details on respective GUI components. The Applet consists of seven GUI components such as two labels Name and Price followed by two textfields of size 10 respectively. There are two buttons labeled as ADD and DISPLAY followed by a Textarea. … | |
I'm trying to get hang of custom events and listeners. I found example of single event-listener, but I'm curious how to extend from single method to multiple that are related. [code=Java]public interface CountListener{ public void countEvent(int count); public void multiplyEvent(int multi); }[/code] [code=Java]public class Counter implements CountListener{ public void countEvent(int … | |
i am unable to understand WHAT MAKES THE BYTECODE IN JAVA, MACHINE INDEPENDENT. I mean how does the bytecode built after compilation becomes machine independent, or what are the properties that make the bytecode machine independent? EXAMPLE:- If i compiled a program on a x86-64 machine and after sometime i … | |
Dear Friends, Am using inifile management,want to read and update ini files, for this am using properties class methods (below). but settings in ini files are changed while am updating, properties.load(inputstream); properties.put(writeIDName, writeData); please tell me how we can update inifile with out affecting the exisiting content in ini file,if … | |
I want to sort the getSal values in the myList. It should be a sorting algorithm implementation so that adding or removing objects does not affect the performance. [CODE]import java.util.*; public class payment { public String name; public int salary; void setName(String _name) { name = _name; } String getName() … | |
Hi, i am trying to connect to MySQL database [ICODE]mysql[/ICODE] using JAVA .. using code given below, [CODE]import java.sql.*; public class dbExample{ public static void main(String[] args) { System.out.println("Listing all table name in Database!"); Connection con = null; String url = "jdbc:mysql://localhost:3306/"; String db = "mydb"; String driver = "com.mysql.jdbc.Driver"; … | |
i[CODE]mport javax.swing.*; public class ReverseArray { public static void reverse(int b[]){ int left = 0; int right = b.length -1; while(left<right){ //exchange the left and right elements int temp = b[left]; b[left] = b[right]; b[right] = temp; left++; right--; } } public static void main(String a[]){ } } [/CODE] how … | |
Consider the following codes : File : C3.java [CODE]package G; public class C3 { protected int a=5; }[/CODE] File : R3.java [CODE]import G.C3; class R2 extends C3 { void doit() { a=7; } } class R1 extends R2 { void doit(R2 b) { a=8; b.a=1; // (1) } }[/CODE] It … |
The End.