32,199 Topics

Member Avatar for
Member Avatar for confusedin82

I am trying to use an action listener to fill an array, however I want to fill ONE array from two different sources: ComboBox Selection & JList selection. so I am trying to create an Array that will look similar to this format(each line is representing a different subscript) ComboBoxData …

Member Avatar for JamesCherrill
0
134
Member Avatar for deepakyadav1830
Member Avatar for javaAddict
0
245
Member Avatar for grisha83

Hello, I am having a hard time with understanding arrays and most importantly implementing them in methods and etc. Does anyone know a good source to learn about arrays from a to z? I really need to nail down these guys. Any help will be appreciated Thank you

Member Avatar for John A
0
111
Member Avatar for AirmanTheGreat

Guten Tag, What we need to do is to call a variable (numbersToEnterInteger) from the main method to the total_average method. Also how do we pass the entire array to this method, rather than a single array element. Thanks in advance. Oh and also heres the code. [code] /** * …

Member Avatar for AirmanTheGreat
0
149
Member Avatar for grisha83

Hello, I am having a hard time with understanding arrays and most importantly implementing them in methods and etc. Does anyone know a good source to learn about arrays from a to z? I m looking for things like book, website or some other media. I do know about Sun …

Member Avatar for llemes4011
0
272
Member Avatar for cameclifton

[code] import java.util.Scanner; public class encryption { public static void main (string[] args) { int temp, first,second, third, fourth,encryped; int a = first,b = second,c = third, d = fourth; int a = c,c = a; int b = d,d = b; System.out.println("After swapping a = " + a + …

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for deepakyadav1830
Member Avatar for BestJewSinceJC
0
197
Member Avatar for transplantedNYr

I am new to java and many of the nuances to this language. For my class assignment we need to finish our methods which I have already done and do not want any help with. What I need help with is reading the data from the file with in "main". …

Member Avatar for transplantedNYr
0
158
Member Avatar for klactose

Hi, I am trying to make a gui in which I import and combine 4 seperate classes JPanel classes that I made into one interface. But I am running into an obstacle that I am uncertain about. Here is the situation: 1. I have container using a BoxLayout that has …

Member Avatar for klactose
0
177
Member Avatar for esesili

Hi all, I am trying to write a simple program but I am having an error message that I am working on it for three days. The aim of program is to convert entered value depending on the clicked radio buttons. Please can someone help me about it ? Thanks, …

Member Avatar for JamesCherrill
0
143
Member Avatar for help,mdesperate

Please give me the code of a swing program which displays a button with an image on it.The image on the button should change when it's clicked.

Member Avatar for ahlamjsf
0
213
Member Avatar for zyaday

I have many projects in a software. Although some files and classes are shared within these projects, there are classes used by most of these projects. How do i creat classes that can be shaed among different projects . Is there anything in java that can function the same as …

Member Avatar for kvprajapati
0
194
Member Avatar for ammenme

hi please can some1 help me out with this project,this is the project write a program to process a set of student marks. Each line of the input file follows this format: a name (which may be considered as a unique key for the purpose of this assignment) followed by …

Member Avatar for Helma
0
194
Member Avatar for marco01

Hi Everyone, Days that I'm on that problem. I have to calculate a substitution score. Below my code: [code] public void calcSubstitutionScore() { substitutionScore = (average + examMark) /2; } [/code] I previously created the method average, and I try to add to it examMark divide by two, which is …

Member Avatar for marco01
0
101
Member Avatar for benatschool

Hi, I am working on a Java assignment of developing a University diploma program as follows: uni-diploma (one-to-many) diploma-module(one-many) module-lectures(one-many) lecture-student(many-many) class [I]uni[/I] contains TreeSet diploma all set and get methods for adding each new diploma in the set and association to class diploma. class [I]diploma[/I] contains TreeMap module all …

Member Avatar for javaAddict
0
112
Member Avatar for grisha83

Hello,I have a user input and trying to write a precondition that will give an error if the user inputs number or some other odd character (except ' and .) I am thinking of writing and if statement that if my search method finds anything like that it will prompt …

Member Avatar for grisha83
0
78
Member Avatar for DotA

I'm learning GUI, can anyone show me how to display an image on a panel. So far I have this: [code=java] import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; import javax.swing.*; import java.applet.*; public class JlabelDemo { public static void main(String[] args) { // create an image icon, …

Member Avatar for VernonDozier
0
131
Member Avatar for puk

Hi, The problem i'm having is that the data that i want to appear on the file doesnt apear fully. I want the full results of the program to be saved to a doc file but i only get the next number in the sequence. Here is my code # …

Member Avatar for BestJewSinceJC
0
99
Member Avatar for Dio1080

Hello, BTW the program compiles. Im trying to change a quick sort program so that it picks a median of three for the pivot instead of the first low number. My code is not running right, can somebody help me out. thanks [code=java] public class QuickSort{ public static void main(String …

Member Avatar for BestJewSinceJC
0
931
Member Avatar for jpjpjpjpjp

Hi, I have an entity class which I would like to write from one machine to another using sockets. As each machine has a separate copy of the entity class (identical except for package declaration) a ClassCastException will be throw; it seems the only way I could do this is …

Member Avatar for kvprajapati
0
71
Member Avatar for yugho

Dear all, I'd like to write a Java program that could use functions in an existing VB.Net dll or exe. Is it possible to do that? I had actually searched for methods online, and it seems like there's JNI which could do that, but after reading the implementation I got …

Member Avatar for kvprajapati
0
103
Member Avatar for valenchang

Hello, I am a noob in Java, and I am stumped with these 2 exercises. These are probably extremely simple for you all, so any kind of help with writing the program would be well-appreciated. 1. Write a program which simulates inflation of a balloon (2-dimensional circular shape starting from …

Member Avatar for Ezzaral
0
112
Member Avatar for Kishorey

Hi, I created a sample frame in Java and connected with the database and when i converted to exe file the database is not accessible ..can any1 suggest me is it possible to access database in exe else wat method do i need to implement in order to acheive this.

Member Avatar for Kishorey
0
55
Member Avatar for yesntu09

Hi everybody, So i am totally new to the programming world but I have manage so far to learn how to connect to mysql database to Java and execute a simple query. However, I would like to know if there's a way I could make this query to look like …

Member Avatar for javaAddict
0
106
Member Avatar for tayhaithian

i have problem that in showpane Modify and Delete pane3 eventhough clicked delete button for the action but the combobox "Select Book" doesnt update in the list that the deleted book still exist. What happen ? any guide ? thx in advance . [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import …

Member Avatar for javaAddict
0
127
Member Avatar for abhi_elementx

hello . I am trying to simulate the MD5 hashing algo. My code: [CODE] private void jButton1MouseClicked(java.awt.event.MouseEvent evt) { try { MessageDigest object = MessageDigest.getInstance("MD5"); String str = jTextField1.getText(); byte arr [] = str.getBytes(); object.update(arr);//update the md5 object with the message arr = object.digest();//calculate the digest str = IntegerToHex(arr);//convert to …

Member Avatar for abhi_elementx
0
119
Member Avatar for genuis1

hi, everyone i'm new in java programming i need help in my simple project i have list contain names of persons from db .. i finished it using access ... the problem that i wanna to 'when i select any name of this two window open and chat between each …

Member Avatar for genuis1
0
71
Member Avatar for JAMartin6815

I getting an error from a code that I have been working on. The error is Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at sample2.AdditionalMethods.main(AdditionalMethods.java:57) My code for the information is package sample2; public class shape { private String Name; …

Member Avatar for JAMartin6815
0
175
Member Avatar for bdrose64

Hi, I am trying to create a mortgage calculator per an assignment and have it working ALMOST perfectly. I just need to add a loop to make it pause when the screen is filled and wait for an ENTER until the loan balance is 0. Can someone help me? Here …

Member Avatar for VernonDozier
0
92
Member Avatar for helixkod

I am having trouble printing onto a JPanel. I am able to print any string that i want to. here my code: [CODE]import javax.swing.JFrame; import java.awt.BorderLayout; import javax.swing.JLabel; public class TestDraw { public static void main(String[] args) { final int WINDOW_WIDTH = 300, WINDOW_HEIGHT = 300; DrawPanel panel = new …

Member Avatar for sillyboy
0
165

The End.