32,204 Topics
| |
Hey all, I want to write an application that I can run from the console where it loads settings from a config file. I also want to be able to double click on the executable and obtain a GUI where I can specify settings that will be stored in the … | |
Hello, I go to Georgia State University with a Computer Science major. I was wondering what what be a good gpa to graduate with in order to put me ahead of the competition. Mind you Georgia State is my of the top 5 school in Georgia. Thank you | |
How do I search a linked list for a string ? findXX(string) , for instance. | |
I'm sure that there is an article on here already about this, but I didn't see it. I'm trying to make my java application executable so I can share it with friends but whenever I use eclipse to make it a jar or executable jar file and send it to … | |
mport java.awt.Color; import java.awt.Graphics; import javax.swing.JOptionPane; why this is not working need help public class NewClass { static String myBinary; public static void main(String[] args) { String code = JOptionPane.showInputDialog("Please enter zipCode: "); BarCode myBar = new BarCode(code); myBinary = myBar.getCode(); int length= code.length(); if (length != 5 && length!=9) … | |
Hi everybody, I'm just wondering what is the more eficient and compact way to write statements like this if(site.next(1) == null) { return false; } if(site.next(2) == null) { return false; } if(site.next(3) == null) { return false; } | |
Hi, a question about stand-alone Java applications that do not have a background DB. In our Uni class we were asked to build a very small application using JOptionPane methods such as "showInputDialog". The application asks for users name and birthdate and at the end displays a summary of these … | |
i really hate php and javascrip but i really want to make a social network website just for fun. so i wanted to use java, sql, and html to make. i already know these 3 languages and i know how to set a database but i dont know how to … | |
Im having a difficult time finding info on how to set up a combobox listener for my project. My book has 1 example and it uses audio files.(no help) My project consists of a GUI panel with a splitpane that that has a list of info on the left for … | |
Hi all, I'm working on a simple Java project on student database. One of the methods I need to implement obviously involves searching for a student in the student registration using the student id input. Here is what I've been asked to do: *-searchStudentRegistration(String studentId): Using the studentId you will … | |
I got quick question regarding Java less say i got provided with this code: public void printNext(int x){ System.out.println((x+1) % 3); } public void printSequence(){ for (int i=0; i<5; i++) printNext(i); } The question is : 'What sequence of number is printed by printSequence()?' Ok first its going do 0+1=1 … | |
Hi, I am trying to create document using iText. I am using Eclipse IDE. I've imported the jar files (itextpdf-5.2.1.jar and itext-xtra-5.2.1.jar). However RtfWriter2 is not being recognised as a class. Document doc = new Document(); RtfWriter2 writer = new RtfWriter2(); RtfWriter2.getInstance(doc,new FileOutputStream("testRTFdocument.rtf")); Can someone help me in figuring out … | |
Hi :) Is it better to have a one file program (ex. MyProgram.class) or a multiple file one (ex. Main.class and Gui.class and Draw.class)? thx | |
who can help me?? Create a solution for the following scenario: A local community mobile college unit holds 2 different classes in literacy and numeracy for mature students. A student can join the mobile unit and sign up to one or both classes. The students ID number, forename, surname, age … | |
Filterable `AbstractListModel` uses `originalModel` of `JList` as source and excludes those items from `originalModel` that matches exclude criteria specified by given regex. It also allows reusing same model (with filtering capability of course) for multiple JList components. It also registers as `ListDataListener` to `originalModel` model to be able to relay … | |
Hi, I've created a small application that allows the user to capture the screenshot and save the image at a user defined location. It also allows the user to capture the screenshot of the active window as well. The issue is with the active window. I have learnt that Java … | |
Hello, I am having some trouble writing this java GUI. First in the win1, i cannot get the start and exit button to the bottom of the page along with the jlabel into the center. Next for win2 i cannot resize the "go here" button at the bottom of the … | |
I have been trying to teach this myself, but I judt don't get it. I have 10 books with ISBN number, title, name of author. The linked list should display the books sorted by ISBN. I hope this collections.sort is correct: import java.util*; public class Sort { public class Sort … | |
I am designing a very basic form in which I am using GridBagLayout to position and size the GUI components. All the components get sized and positioned exactly as I expect from my code except the two radio buttons named "noRadio" and "yesRadio" respectively. I want them to appear next … | |
Hi. I cannot explain my question very well. I have an array of objects. Can i perform a search in this? Check the following code as example: public class test1 { public static void main (String[] args){ test2[] array = new test2[2]; for(int i=0;i<2;i++){ array[i]=new test2(); } int a=1, b=2; … | |
//This is the package file package radz1990; import java.io.*; import java.util.*; import java.lang.*; public class radz1991a1 { BufferedReader ob=new BufferedReader(new InputStreamReader(System.in)); Scanner obj=new Scanner(System.in); public String name=new String("0"); public String patientid=new String("0"); public String prescription=new String("0"); public String Illness=new String("0"); public String Address=new String("0"); public String ladate=new String("0"); public int … | |
| I made a creature composed of shapes in a Java Applet. I want to basically copy and paste the creature I made so I have say 7-8 copies on the same applet. but in different locations. Is there an easy way besides copying the entire code, and moving each coordinate … |
Hello, The following program computes the value of Pi using the Hit/Miss method. Since I am doing all the drawing in the JPanel, I am not calling super.paintComponent(g). The program works well, but since I am not using the super.paintComponent, it does not draw the background. Is there any way … | |
*This program is supposed to printout all the first letters of the Strings enterned in an Array. Which works. but when I added some code to convert the first letters to uppercase, there's an error.* I put a comment in the code where the error is. what's wrong with that … | |
hi, I'm currently building a game and stuck at the paintComponent method. I'm trying to add 3 graphic buttons to the JPanel but the paintComponent does not execute (all I get is gray window) here's my code : public class TwinMoonTowers extends JPanel implements ActionListener{ private class TMTMenu extends MouseAdapter{ … | |
Hello guys, There is a thing I need help with. When I run my program, and the window shows, I want focus on the textField. Like Google, when you enter Google, you get focus on the search panel so you can search. My program got a simple search engine with … | |
<?xml version="1.0" encoding="ISO-8859-1"?> <project name="ant_template_core_java" basedir="." default="info"> <!-- Properties files --> <import file="../masterbuild/masterbuildproperties.xml"/> <import file="../lib/libproperties.xml"/> <import file="../implementation/implementationproperties.xml"/> <import file="../api/apiproperties.xml"/> <import file="../junittest/junittestproperties.xml"/> <import file="../javadocs/javadocproperties.xml"/> <!-- Ant task files --> <import file="../implementation/implementation.xml"/> <import file="../api/api.xml"/> <import file="../junittest/junittest.xml"/> <import file="../javadocs/javadoc.xml"/> <import file="../masterbuild/masterbuild.xml"/> <import file="../log4j/log4j.xml"/> <!-- Make directory files --> <import file="../masterbuild/masterbuildmakedir.xml"/> <import file="../implementation/implementationmakedir.xml"/> <import … | |
I don't understand why it just prints numbers. /* This program converts the first letters of the entered strings for an array to uppercase*/ import java.util.*; import java.lang.String.*; public class myfirstarray{ static Scanner scan = new Scanner(System.in); static String str1, str2,str3, str4,str5; public static void main (String[]args){ String[] items = … | |
An example of a multi-tier application where each tier of the application throws its own exceptions that are caught by other tiers of the application. | |
i have to decrypt a frame on my server. encrypted frame is coming from client device through GPRS on socket.encryption is done with "TripleDes" and with a given key.same algorithm and key i am using n server side. frame is a combination of Hex and Ascii String. problem is when … |
The End.