388 Posted Topics

Member Avatar for asong

Start work with the base linear function[QUOTE]f(x)=x for [-1.0,+1.0] with step 0.1[/QUOTE]. Create a class (for example Equation extends java.lang.Object) with constructor and methods. Results print only to console. This is not a joke. See you later.

Member Avatar for quuba
0
677
Member Avatar for ShuiYinDeng

The way is use constructor [QUOTE]public TreeSet(Comparator<? super E> comparator)[/QUOTE] , and write own String comparator where the case of letter is irrelevant

Member Avatar for ShuiYinDeng
0
153
Member Avatar for DazednAngry

Go step by step Create from scratch class Polynomial implement set( , get( , String toString() methods and show

Member Avatar for BestJewSinceJC
0
131
Member Avatar for Logi.
Member Avatar for quuba
0
886
Member Avatar for kinger29

First init all components Used BorderLayout and CardLayout [CODE]import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; public class Main_app extends JApplet { private Container content; private JPanel centerPanel; private CardLayout card; public void init() { content = getContentPane(); setSize(800, 600); content.setBackground(Color.GREEN); content.setLayout(new BorderLayout()); JPanel northPanel = new JPanel(); JButton vigenere_b …

Member Avatar for quuba
0
249
Member Avatar for jakx12

[CODE]wallChooser.setCellSelectionEnabled(true);[/CODE] test [CODE] for (int y = 0; y < 4; y++) { for (int x = 0; x < 4; x++) { // if (wallChooser.isCellSelected(y, x)) { String value = "" + x + "|" + y + "|" + wallChooser.isCellSelected(y, x); wallChooser.getModel().setValueAt(value, y, x); System.out.println("works again" + x …

Member Avatar for quuba
0
263
Member Avatar for king_kiddy

It is possible in Java. how to work with camera with JMF : [URL="http://www.darnok.org/programming/motion-detection/"]http://www.darnok.org/programming/motion-detection/[/URL] FMJ extension of JMF (MPEG4 codec): [URL="http://www.artima.com/forums/flat.jsp?forum=276&thread=164831"]http://www.artima.com/forums/flat.jsp?forum=276&thread=164831[/URL]

Member Avatar for quuba
0
65
Member Avatar for system analysis

[CODE]public class Picture { public static void main(String[] args) { String s1 = "pppppppppppplllllllllleeeaaaaaaaaasssssssse"; String s2 = "pppppppppppp eeeaaaaaaaaasssssssse"; String s3 = " llllllllll "; System.out.println(s1 + "\n" + s2 + "\n" + s3 + "\n" + s2 + "\n" + s1); } }[/CODE] Adopt with your REQUIREMENTS

Member Avatar for quuba
0
83
Member Avatar for Room101

[URL="http://www.brackeen.com/javagamebook/"]http://www.brackeen.com/javagamebook/[/URL] Chapter 4, "Sound Effects and Music"

Member Avatar for quuba
0
101
Member Avatar for Room101

[URL="http://mindprod.com/jgloss/applet.html#RESTRICTIONS"]http://mindprod.com/jgloss/applet.html#RESTRICTIONS[/URL]

Member Avatar for quuba
0
114
Member Avatar for agentgaurav007

Change name of your[QUOTE] public static void main(double totalstones, int userstones, double computerstones)[/QUOTE]method to any other to avoid confusion. It's no necesary, but.. Listen to the Grn Xtrm.

Member Avatar for quuba
0
105
Member Avatar for RejectKid

In place of varible Rectangle r introduce method [CODE] public Rectangle getRectangle() { return new Rectangle(xCoord, yCoord, Width, Height); }[/CODE] or update, while move() r varible [CODE] public boolean intersects(BallImpl ball) { return this.getRectangle().intersects(ball.getRectangle()); }[/CODE] In method public void checkCollision() check only ( (n*n)-n) /2 cases

Member Avatar for quuba
0
235
Member Avatar for Room101

1. static method invoke in static form: CLASS . STATIC_METHOD_NAME ( PARAMETERS ); 2. static definition of String array: new String[]{"a.wav"} // array length=1 [CODE]public void test() { AudioPlayer.main(new String[]{"a.wav"}); }[/CODE] Always post code of error.

Member Avatar for Room101
0
101
Member Avatar for dhanh90
Member Avatar for dhanh90
0
166
Member Avatar for kekkaishi

check s: [CODE]String s = rs.getString("userType"); System.out.println("|"+s+"|"); usertype = Integer.parseInt(s);[/CODE]

Member Avatar for kekkaishi
0
1K
Member Avatar for Xessa

[URL="http://itextdocs.lowagie.com/examples/com/lowagie/examples/fonts/styles/FontStylePropagation.pdf"]http://itextdocs.lowagie.com/examples/com/lowagie/examples/fonts/styles/FontStylePropagation.pdf[/URL] [URL="http://itextdocs.lowagie.com/tutorial/fonts/styles/index.php"]http://itextdocs.lowagie.com/tutorial/fonts/styles/index.php[/URL]

Member Avatar for quuba
0
110
Member Avatar for sbmahire

[URL="http://www.postgresql.org/docs/7.4/interactive/datatype-binary.html"]http://www.postgresql.org/docs/7.4/interactive/datatype-binary.html[/URL]

Member Avatar for quuba
0
32
Member Avatar for shashikant.v
Member Avatar for tipalm

[CODE]Line 8: JPanel titlePanel, buttonPanel, dealerPanel, playerPanel;[/CODE] [CODE]Line 68: JPanel playerPanel = new JPanel();[/CODE] Two declaration of playerPanel? First of them is null! [CODE]Line 136: playerPanel.setVisible(false);[/CODE]

Member Avatar for quuba
0
165
Member Avatar for nola_Coder

[QUOTE]Comparing with the == Operator[/QUOTE] [URL="http://java.sun.com/mailers/techtips/corejava/2006/tt0822.html"]http://java.sun.com/mailers/techtips/corejava/2006/tt0822.html[/URL] [QUOTE] The == operator works on String object references. If two String variables point to the same object in memory, the comparison returns a true result. Otherwise, the comparison returns false, regardless whether the text has the same character values. The == operator does …

Member Avatar for nola_Coder
1
168
Member Avatar for bruceaj

[QUOTE] Project Properties Libraries Add JAR/Folder[/QUOTE] find folder and indicate your jar file

Member Avatar for quuba
0
318
Member Avatar for mayurjadhav

It is important to think at a high level of abstraction. Different programming languages (in varying degrees) provide translate mental constructs to the level of a programming language.It is important to create a custom model for the particular problem. Model that is able to accept data, process and deliver results …

Member Avatar for quuba
0
98
Member Avatar for Xessa

[CODE] //PdfPCell txt = new PdfPCell(new Phrase(text)); PdfPCell txt = new PdfPCell(new Paragraph(text, font));[/CODE]

Member Avatar for quuba
0
61
Member Avatar for george21

You are using a different constructor [CODE]public JLabel(String text)[/CODE]You should use another[CODE]public JLabel(Icon image)[/CODE]All instances of ImageIcon keep in the array [CODE]ImageIcon[] iconArray;[/CODE]

Member Avatar for IrishWay
0
109
Member Avatar for L0rDKadaj

Themes: 1.Chaotic Neuro-Computer model. [URL="http://sciencelinks.jp/j-east/article/200106/000020010600A0743137.php"]http://sciencelinks.jp/j-east/article/200106/000020010600A0743137.php[/URL] [URL="http://www.itk.ppke.hu/Gaurav_diss_ENG.pdf"]http://www.itk.ppke.hu/Gaurav_diss_ENG.pdf[/URL] 2.Model of the solar system's boundaries. Role of (Energetic Neutral Atoms or ENAs) [URL="http://www.nasa.gov/mission_pages/ibex/index.html"]http://www.nasa.gov/mission_pages/ibex/index.html[/URL] 3.Data clustering [URL="http://biometrics.cse.msu.edu/JainDataClusteringPRL09.pdf"]http://biometrics.cse.msu.edu/JainDataClusteringPRL09.pdf[/URL] [URL="http://www.cse.msu.edu/biometrics/Presentations/FuLectureDec5.pdf"]http://www.cse.msu.edu/biometrics/Presentations/FuLectureDec5.pdf[/URL] 4. Choosing the best cell-phone provider using game theory model Rock- Paper- Scissors (RPS) [URL="http://en.wikipedia.org/wiki/Rock-paper-scissors"]http://en.wikipedia.org/wiki/Rock-paper-scissors[/URL]

Member Avatar for wallerpaine
-3
205
Member Avatar for Ranek

If separate, then separate: [CODE]import java.util.Scanner; /** * * @author j3c */ public class Ranek { static Scanner scan = new Scanner(System.in); static int ConsoleOptionGUI(String s) { int res = -1; do { System.out.println(s); res = scan.nextInt(); } while (res < 0 || res > 2); System.out.println("--> " + res); …

Member Avatar for Ranek
1
392
Member Avatar for meddlepal

line:19 one byte missed each loop ! [QUOTE]public int read() throws IOException Reads a byte of data from this input stream. [/QUOTE] line:16 single and always the same instance of byte array ! Result of run: [QUOTE]run: 100 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA* BUILD SUCCESSFUL (total time: 0 seconds) [/QUOTE] [CODE]public class FileIOTest { …

Member Avatar for quuba
0
615
Member Avatar for majestic0110

bug? test: [CODE]String format = "String a = %s String b = %s \n"; System.out.printf(format, a, b); System.out.printf("String a + %s String b + %s \n", a, b); System.out.printf(new String("String a = %s String b = %s \n"), a, b); System.out.printf("String a " + "=" + " %s String b …

Member Avatar for quuba
0
241
Member Avatar for saadi ahmad

Java Game Fundamentals [URL="http://www.brackeen.com/javagamebook/"]http://www.brackeen.com/javagamebook/[/URL] with source code

Member Avatar for quuba
-1
92
Member Avatar for FallenPaladin

you do not specify exactly what conditions are imposed on the input string [CODE]package demo; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @author j3c 14 IX 2009 */ public class RegexTestProgram { static String[] reg = {"\\d{4}", "\\d{4}$", "^[0-9]{4}", "^[0-9]$", "[0-9]", "^[0-9]\\z", "\\d", "^\\d$", "\\b\\d\\d\\d\\d", …

Member Avatar for quuba
0
104
Member Avatar for estefania
Re: HELP

[CODE] public class GuessingGame { public static void main(String[] args) { while (game()) { } System.out.println("Thank you for playing!"); } public static boolean game() { Scanner scan = new Scanner(System.in); int n; //a random computer generated number //................................ System.out.println("Do you want to play again? [Y/N]"); reply = scan.next(); } while …

Member Avatar for Grn Xtrm
0
113
Member Avatar for fortex

compare[CODE]case 11: x2 = Arreglos.existeValor(a);[/CODE]with[CODE] public static boolean existeValor(int a[], int valor, boolean v) {[/CODE] existeValor(a) --->missed valor and v parameters in invocation existeValor(int a[], int valor, boolean v)

Member Avatar for BestJewSinceJC
2
149
Member Avatar for llemes4011

[URL="http://zetcode.com/tutorials/javaswingtutorial/draganddrop/"]http://zetcode.com/tutorials/javaswingtutorial/draganddrop/[/URL] Mix examples , for javax.swing.JButton use [CODE] DataFlavor flavorButton = new DataFlavor("application/x-java-jvm-local-objectref; class=javax.swing.JButton");[/CODE] an build own D&D. google search "application/x-java-jvm-local-objectref"

Member Avatar for llemes4011
0
162
Member Avatar for locked_twilight

for sequence 2MR*2=R*2= ok. [CODE] case '=': resultStr = evaluate(); displayText.setText(resultStr); numStr1 = resultStr; numStr2 = " "; //firstInput = false; firstInput = true; break;[/CODE] but for 2MR*2R*2 no ok. [22]

Member Avatar for locked_twilight
0
147
Member Avatar for didi00
Member Avatar for Jocamps
0
154
Member Avatar for mactavish

[QUOTE=mactavish;1010637]i am new in j2me programming and i want to code a file compression/decompression in series 40 phones. anyone could help me or could share their codes with me. thank you very much[/QUOTE] google search j2me programming code a file compression/decompression in series 40 phones

Member Avatar for quuba
0
70
Member Avatar for newjavastudent

[CODE] public static List getData(String fileName) { boolean DEBUG = false; List<Product> recordList = new ArrayList<Product>(); try { File file = new File(fileName); Scanner reader = new Scanner(file); String s; while (reader.hasNext()) { s = reader.nextLine(); if (DEBUG) { System.out.println("(" + s + ")"); } if (s.isEmpty()) { System.out.println("-------- DETECTED …

Member Avatar for quuba
0
80
Member Avatar for RoflNinja

[CODE] if (returnValue.contains("won")) { return false; } // } <--------------------------------------------< whoseTurn = whoseTurn + 1; return true; } /** * Player 4 */ if (whoseTurn == 4) { //<---- Errors here[/CODE]

Member Avatar for quuba
0
176
Member Avatar for low1988

first is OK [CODE]String strTemp = JOptionPane.showInputDialog(null, "Please Enter C To Open A Current Account \n Or J To Open A Joint Account"); switch (strTemp.charAt(0)) { case 'c': case 'C': //code statement System.out.println("cC"); break; case 'j': case 'J': System.out.println("jJ"); break; default: System.out.println("no(cC,jJ)"); }[/CODE] Always add :default:" steatment. This is a …

Member Avatar for low1988
0
708
Member Avatar for KimJack

[CODE]for (int a = 0; a <= (gridSize * gridSize); a++) { for (int a = 0; a < (gridSize * gridSize); a++) {[/CODE]

Member Avatar for quuba
0
116
Member Avatar for VirtueAL

To start, work with the simplest logic, no gui, no color , no shapes. [CODE]public class LightSimple { boolean switched;// state of light public LightSimple() { switched = false; // default state - false } public void switchOn() { switched = true; } public void switchOff() { switched = false; …

Member Avatar for quuba
0
101
Member Avatar for TaP1227

for example Line:114 Convert char array to String and then write. Use String constructor: public String(char[] value) [CODE]String s = new String(password); System.out.println("Password: " + s);[/CODE] or [CODE]System.out.println("Password: " + new String(password))[/CODE]

Member Avatar for TaP1227
1
134
Member Avatar for theo19

Replace [CODE] // frame.setSize(200, 200); frame.pack();[/CODE] now debug program. why you have so much space?

Member Avatar for BestJewSinceJC
2
191
Member Avatar for whiteyoh

add objects to the list [CODE]List<CD> cdList = new ArrayList<CD>();[/CODE] and work with list. you are going to the OOP!

Member Avatar for VernonDozier
-1
101
Member Avatar for MMD88

Hello MMD88 at begin define 0! in array at index 0 ; 0! = 1 set currentIndex to 0 currentIndex - indicates last calculated factorial in array [quote] array[0] = 1; currentIndex = 0;[/QUOTE] [CODE] public static int factorial(int k) { if (k < 0) { k = 0; } …

Member Avatar for quuba
0
121
Member Avatar for Ajantis

All fields inside classes private, non static. My concept of view to the architecture of program. I don't sure you happy, if I post whoole code. I'm not sure if it would be correct in the learning process. [CODE]package ops023_lab01_uppgift_jc3; import java.awt.Point; public class LabAlarm { //make sure that they …

Member Avatar for quuba
0
175
Member Avatar for vamsi310
Member Avatar for jralexander137

I was wondering if anyone would care to how many people ask [I]"I was wondering if anyone would care to"[/I] Answer: over 1,320,000 + 2 in this text.

Member Avatar for vamsi310
0
99
Member Avatar for Shigekazu
Member Avatar for gibson.nathan

Example output is [QUOTE]run: Wins: 0 Total: 0 Wins: 0 Total: 1 Wins: 0 Total: 2 Wins: 0 Total: 3 Wins: 0 Total: 4 Wins: 0 Total: 5 Wins: 1 Total: 6 Wins: 1 Total: 7 Wins: 1 Total: 8 Wins: 2 Total: 9 Wins: 2 Total: 10 Wins: 2 …

Member Avatar for VernonDozier
0
634

The End.