32,199 Topics
| |
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 … | |
i want to add the value in map to a float value what should i do?s | |
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 | |
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] /** * … | |
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 … | |
[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 + … | |
i want to add the value in map to a float value what should i do? | |
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". … | |
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 … | |
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, … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 # … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … |
The End.