Forum: Java 26 Days Ago |
| Replies: 1 Views: 155 in Product class made public method with proper return type, and use in place of |
Forum: Java 26 Days Ago |
| Replies: 2 Views: 594 Hidden advertorial. How can I help you in your business? |
Forum: Java 26 Days Ago |
| Replies: 3 Views: 583 As a random generator use Class java.util.Random. Method nextInt(...
details in docs
java.util.Random r;
int give_me_number_0_49() {
return r.nextInt(49);
} |
Forum: Java 26 Days Ago |
| Replies: 3 Views: 259 Show your typeof_patronJComboBox model. Post more code ... as attachment (for example). Line 9 is on the first look looks is on its way a strange. |
Forum: Java 29 Days Ago |
| Replies: 5 Views: 374 |
Forum: Java 32 Days Ago |
| Replies: 5 Views: 323 Introduce own boolean flag 'pressed' and use it to switch needed behavior |
Forum: Java 32 Days Ago |
| Replies: 5 Views: 326 |
Forum: Java 33 Days Ago |
| Replies: 5 Views: 374 Your program
// s for string and c for search character
int i = 0;
int result = 0; //number of occurences
for(i = 0; i < s.length(); i++)
{
if (s.charAt(i) == c) //... |
Forum: Java 33 Days Ago |
| Replies: 3 Views: 324 Default polynomial:
Look athttp://en.wikipedia.org/wiki/Polynomial#Classifications
The simplest polynomial is
I would like to see that Your default Polynomial() meet the minimum requirements to... |
Forum: Java 33 Days Ago |
| Replies: 3 Views: 324 public static void main(String[] args) {
Polynomial polyAdd = new Polynomial();
System.out.println(polyAdd.toString());
}
Why it gives error, where are defaults... |
Forum: Java 34 Days Ago |
| Replies: 3 Views: 239 Write new class
Place in it your array
Start from single char. Get result.
Later use array of char or String.
//
Alternatively you can do all work inside single static method. |
Forum: Java 34 Days Ago |
| Replies: 1 Views: 151 write the method
in this method loop around the array, if value associated with current loop-index is equal to i-value return true... |
Forum: Java 34 Days Ago |
| Replies: 2 Views: 202 |
Forum: Java 34 Days Ago |
| Replies: 5 Views: 374 You've written a program to count the specific character given c. This character may also be a space. How much can be different characters in your text? Each character has its representation as an... |
Forum: Java Nov 3rd, 2009 |
| Replies: 2 Views: 427 use varibles for labels
first declare in proper place: JLabel label1;
In constructor create new instance of label: label1 = new JLabel(card1);
add this label ...
///
In method actionPerformed... |
Forum: Java Nov 3rd, 2009 |
| Replies: 4 Views: 308 http://www.javaworkspace.com/connectdatabase/connectPostgre.do
http://jdbc.postgresql.org/download.html |
Forum: Java Nov 3rd, 2009 |
| Replies: 3 Views: 203 Nothing to change. This form is fully acceptable.
--------
You can try CardLayout; on each tab, you can put only the necessary components labels and txtfields, and switch between tabs in accordance... |
Forum: Java Nov 3rd, 2009 |
| Replies: 8 Views: 342 . check x on input, where x is old
. if x >=0, INPUT never occurs, then x remain forever old >= 0 value |
Forum: Java Nov 3rd, 2009 |
| Replies: 3 Views: 276 here is! , and annunfanwen is an author
methodadds usefull spaces as separator L28,38,48,54
method don't know about it . Also can't collect digits together to form number
In addition little... |
Forum: Java Nov 2nd, 2009 |
| Replies: 3 Views: 253 whiteyoh, look at static int ConsoleOptionGUI(String s) method http://www.daniweb.com/forums/thread231390.html
Yet you will not always write all the code in the main method. |
Forum: Java Nov 2nd, 2009 |
| Replies: 3 Views: 211 Look at java doc java.util.Calendar and java.util.GregorianCalendar classes. Nice implemented interfaces, constructors and methods. Nice examples. Their use will reduce drastically the volume of... |
Forum: Java Nov 1st, 2009 |
| Replies: 1 Views: 176 System.exit(0);
comment this, it closes all windows and ends program
find another solution e.g. setting the status window on the invisible |
Forum: Java Nov 1st, 2009 |
| Replies: 4 Views: 252 http://fivedots.coe.psu.ac.th/~ad/jg/objm3g/index.html |
Forum: Java Nov 1st, 2009 |
| Replies: 1 Views: 305 Active Rendering
http://www.gamedev.net/reference/programming/features/javarender/default.asp
Thread Pools
http://www.brackeen.com/javagamebook/
Threads... |
Forum: Java Oct 31st, 2009 |
| Replies: 9 Views: 334 public static void main(String args[]) {
QApplication.initialize(args);
//
QFont font = new QFont();
font.setFamily("Lucida Console");
... |
Forum: Java Oct 31st, 2009 |
| Replies: 9 Views: 334 Summary of conversation.
I know, You want to use the package trolltech to create applications.
As a beginner java programmer you cetainly think "this is the shortest way to achieve rapid... |
Forum: Java Oct 31st, 2009 |
| Replies: 1 Views: 250 Learn first http://www.brpreiss.com/books/opus5/ |
Forum: Java Oct 31st, 2009 |
| Replies: 9 Views: 334 public class CodeEditor extends QPlainTextEdit
{
public CodeEditor(QTextDocument textDocument) //textDocument as parameter in constructor
// public CodeEditor()
{
// here
... |
Forum: Java Oct 31st, 2009 |
| Replies: 9 Views: 334 use method (from documentation of package mentioned above) |
Forum: Java Oct 31st, 2009 |
| Replies: 3 Views: 257 Loading images from filesystem throws I/O error.
I think , better way (for me) is load all images in initial phase of program. For example in specialized method loadImages() , that returns array of... |
Forum: Java Oct 31st, 2009 |
| Replies: 4 Views: 252 On a very general question, do not expect a detailed response
The same url as peter_budo posted
http://chumbalum.swissquake.ch/files/MS3DHelp-HTML.zip |
Forum: Java Oct 31st, 2009 |
| Replies: 3 Views: 257 Add field in Room .
Extend the Room constructor , or write the new one, which takes into account a new parameter, image.
If you dane this, look
Each neighbor already has its own image!
//
Good... |
Forum: Java Oct 31st, 2009 |
| Replies: 9 Views: 334 You are working with package qtjambi. You should know it better.
first read
http://doc.trolltech.com/qtjambi-4.5.2_01/index.html... |
Forum: Java Oct 31st, 2009 |
| Replies: 1 Views: 250 Decide, that you need single Frame. If yes, create class MyLinkPanel extends JPanel in same way as class MyPanel.
Inside constructor MyFrame() add new instance of MyLinkPanel in same way as instance... |
Forum: Java Oct 30th, 2009 |
| Replies: 2 Views: 178 http://www.brpreiss.com/books/opus5/html/page264.html |
Forum: Java Oct 30th, 2009 |
| Replies: 4 Views: 545 public class GCD have a static method gdc. Then you do not need to create new instance of this class .
simply use long val = GDC.gdc(l1,l2); |
Forum: Java Oct 30th, 2009 |
| Replies: 1 Views: 260 1. to generate random index, use public int nextInt(int n) method from java.util.Random, where n is number of questions.
2. introduce int varibles counters for correct and wrong answer. Check... |
Forum: Java Oct 30th, 2009 |
| Replies: 2 Views: 208 L24-29 this is initialization
When you creates (in main method) new instance of ExitJoke the first executed code is L24-29. L26 here is "new ExitJoke", this executes code in L24.
Then your program... |
Forum: Java Oct 30th, 2009 |
| Replies: 3 Views: 276 properly write constructor
reply , what does mean parameter "String in" in contructor?
What information is transmitted to a class? |
Forum: Java Oct 29th, 2009 |
| Replies: 1 Views: 221 this mean
use methods to setColor green,yellow,red ;getColor |