32,204 Topics
| |
i have a question but am confuse the question is create and array of random double floating point numbers,calculate and print the sum off all the numbers in the array.truncates all of the numbers in the array up to 7 decimal places and then calculate and print the sum of … | |
In Design mode in NetBeans IDE, I had a palette with all of my AWT and Swing controls and some netbeans that I can drag and drop onto the Jframe I'm designing, I accidentally closed it. I am not seeing a menu option anywhere to add that palette back as … | |
Hello, I have the code: [CODE] public void color() { QColor color = QColorDialog.getColor(textEdit.textColor(), this); if (!color.isValid()) return; editor.setTextColor(color); } private void setupEditor() { QFont font = new QFont(); font.setFamily("Arial"); font.setFixedPitch(true); font.setPointSize(10); editor = new CodeEditor(); editor.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap); editor.setFont(font); new Highlighter(editor.document()); }[/CODE] but the error is : [B]The method setTextColor(QColor) is … | |
Hi.. Is there any ready-made code for "Binary Search Tree" for Strings? if not, how to use Binary Search Tree with Strings? Thanks. | |
When i do something like [CODE] static int call (Object a){ } main(){ call(10); } [/CODE] it works because of autoboxing But why didn't the language designers support something like this ? [CODE] static int call (Object []a){ } main(){ int []a = new int[10]; call(a); } [/CODE] Why didn't … | |
I'm writing pseducode for a Java class. Obviously being pseudo the language shouldn't matter but thought I'd mention it as it would explain any 'bias' I have. BTW, this is my first programming class. I'm revising for my end of semester exam. Write a pseudo code algorithm which will input … | |
Alright guys i got another one: In the class Mymath, create a public method called calculateFactor. The method has two two arguments of type integer and checks whether the smaller of the two integers is a factor of the larger of the two integers. The method will return a factor … | |
Hello, I am having some difficulty in trying to figure out where I am going wrong in my program. I am trying to convert infix to postfix and from there I am evaluating the postfix. However, it is not compiling correctly. I've tried several things but nothing seems to work … | |
hi everyone, im have just started my java course and im currently doing a project using java applets. my project is web music website and the envisioned system should contain a shopping cart made of an applet. i would like to you to help me with just a syntax of … | |
Vigenère Ciphering You are to develop a program to implement Vigenère ciphering to encrypt and decrypt text information. A description of Vigenère ciphering can be found at: [url]http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher[/url]. To illustrate encryption, a table of characters shown below can be used, termed a tabula recta, Vigenère square, or Vigenère table. It … | |
Hi all, I am looking for an installer to install some application software (java based s/w programme) The installer should perform following actions: 1. License Terms: Accept/Reject selection by user 2. User must select installation folder, default is c:\......\...... 3. Run a bat file/script to install mysql, activemq. 4. Run … | |
This code outputs the result in console. I want to implement a Swing JFrame, producing output readable by user. Do I have to change all my code if I want to use JFrame? Can anyone help? I am not familiar with JFrame at all. Thanks : ) [code] import javax.swing.*; … | |
Pretty much what the title says!! Basically I want to store method generated Strings and then plug them into another method - would hashtable be a way to do this?? Thanks | |
I am doing project on printing a passbook of bank in which i have 8 fields those are transactiondate, particulars,chequeno,debit,credit,balance,print and serialno and i wanted to print that in passbook and print is a boolian type if i mark on one row it must print the other rows present in … | |
Hi Everybody, I have an issue converting images from an image panel to a pdf .I am able to convert a single image to a pdf file but not multiple images.Can anyone help me in this. Below is the code which iam using now public void send(String fn){ BufferedImage oldimage=image; … | |
Alright, I posted earlier with help on compiling my method, now it compiles and now I am stuck again. Help would be great since this awful head cold is getting the best of me. Ok so, so far I have my method almost where I need it, I have my … | |
I have put an array list in a hash map, but the problem is the old values of the hash map are over written everytime. So the old values of the hashmap aren't stored. Could someone tell me what mistake I am making? [CODE] import java.util.*; public class Cain { … | |
I play poker online at PartyPoker, UltimateBet, et. al. During play various hand data is displayed. Can I write a Java program to read and process that data during live play? There is a program called Poker Indicator (not sure what platform) that does this, but I want to add … | |
After completing my code I got an error message at the second to last closing bracket that said I was missing a return statement, I looked in to it online and found that some said to put return 0; but that didn't work it just gave me a new error … | |
Hello again DW. Tomorrow I have an interview and I'm trying to make a jar of my latest project. Using netbeans, I've created a jar and everything looks fine. I can see all the card IconImages in the Jlabels and it looks fine. But when I repaint the frame, the … | |
I have this code, but instead of implementing class enumeration I want to create an anonymous class in the method getEnumeration that does the job right in the return, hwo do I do that? [code] // File: TestList.java (Module 10) // // Author: Rahul Simha // Created: Nov 2, 1998 … | |
I have a question about my java program. I'm new to Java, but I learn fast:P. I have the following problem. I need to communicatie between 2 mobile phones. The entered character will be checked by methode checkletter. After completing the check, the frame will be set. The first 7 … | |
Hello to all, I would like to ask if someone knows any way to display a .swf file in a Java application. I found this link about an API that allows that - [url]http://www.jpackages.com/jflashplayer/[/url] , but it's for Windows only (including some way of converting, so Mac would not be … | |
Hello All, I am developing Chat Application, But facing a problem in displaying Chat text [CODE] public void appendText(String text) { displayChats.replaceSelection("\n"+text); displayChats.setCaretPosition(displayChats.getDocument().getLength()); //Scroll to bottom } [/CODE] Works fine while i append the text to JEditorPane(displayChats). But when I use setEditable(false); (so that user cannot edit it). then I … | |
I m newbie with Hibernate. I use Netbeans IDE for my Java projects. I wrote the *.hbm file and mapping.xml file. and when i try to create the POJO classes, It apparantly does not show the *.hbm and mappng files associated with the project... Any pointers to where I mite … | |
Hi All, Im attempting to make a simple java menu system. the psueo code is as follows 1. user is presented with menu 2. selection is made 3. that action is ran, i.e make a new user (i have this code seperate, which works) 4. the user is returned to … | |
public boolean addEvent(int year, int month, int day, int hour, int minute, int duration, String what); This will return true if the event was added and false otherwise. Only valid events will be added to the list. Also write: public CalendarEvent findNextEvent(int year, int month, int day, int hour, int … | |
Help! The only thing I seem to not get is the initials from the substring........... any ideas? public class Name { //Data Members private String firstName; private String middleName; private String lastName; private String initials; //Default constructor Name() { firstName = null; middleName = null; lastName = null; } //Constructors … | |
Hi All, Hoping you can help with the following. The psuedo code is: 1. Menu is displayed 2. User inputs a selection 3. That item is ran 4. on completion, the user is returned to 1 above. the code i have so far is as follows, but its still exiting … | |
Alright. Ive been at this problem for a few days know and cant figure out what's wrong with my coding. The Problem: Create a method called displayPerfectNumber in your own class named myMath. The method displayPerfectNumber asks a user to enter a integer number and displays every perfect number from … |
The End.