32,204 Topics

Member Avatar for
Member Avatar for christos312

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 …

Member Avatar for christos312
0
600
Member Avatar for lse123

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?

Member Avatar for ~s.o.s~
0
287
Member Avatar for JakeStanely

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 …

Member Avatar for JakeStanely
0
303
Member Avatar for de.ICeman

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 …

Member Avatar for devi.....
0
91
Member Avatar for manish250

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 …

Member Avatar for peter_budo
0
83
Member Avatar for kdmuk10

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 …

Member Avatar for kdmuk10
0
104
Member Avatar for mangopearapples

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) { …

Member Avatar for roxin_phoenix
0
184
Member Avatar for gazzatav

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. …

Member Avatar for gazzatav
0
423
Member Avatar for DanieltheE

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. …

Member Avatar for JKP()
0
153
Member Avatar for newcoder310

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 …

Member Avatar for JKP()
0
95
Member Avatar for scobi

could u tell me plz how we can Radio Button in different location as wel as in image atachment.

Member Avatar for scobi
0
73
Member Avatar for daudiam

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, …

Member Avatar for daudiam
0
125
Member Avatar for daudiam

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 ?

Member Avatar for ~s.o.s~
0
163
Member Avatar for seun101

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; } …

Member Avatar for JamesCherrill
0
94
Member Avatar for gedas

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 …

Member Avatar for quuba
0
228
Member Avatar for kangkan_14

Can anyone please explain what is 'public' and 'private' in oop and specifically in java? I am a bit confused.

Member Avatar for kangkan_14
0
274
Member Avatar for billy leung

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, …

Member Avatar for billy leung
0
175
Member Avatar for in._.cloud

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 …

Member Avatar for pbl
0
38
Member Avatar for renovatiotr

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 …

Member Avatar for Akill10
0
108
Member Avatar for jaycastr

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.

Member Avatar for Akill10
1
455
Member Avatar for AndrewSD

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 …

Member Avatar for KirkPatrick
0
92
Member Avatar for JKP()

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..

Member Avatar for JKP()
0
92
Member Avatar for دموعي

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. …

Member Avatar for دموعي
0
98
Member Avatar for peter_budo

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 …

Member Avatar for svedrenne
0
3K
Member Avatar for arshi9464

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 …

Member Avatar for ~s.o.s~
0
168
Member Avatar for softswing

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 …

Member Avatar for parry_kulk
0
173
Member Avatar for aligajani

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() …

Member Avatar for aligajani
0
175
Member Avatar for khurram.1987

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"; …

Member Avatar for khurram.1987
0
157
Member Avatar for hao90

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 …

Member Avatar for hao90
0
111
Member Avatar for daudiam

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 …

Member Avatar for daudiam
0
206

The End.