31,001 Topics

Member Avatar for
Member Avatar for SergeantJoKer

Hey everyone. I could use some serious help with a Java method that I have to construct for my CMIS class. Basically, I have to develop a static method that has two arrays in it, one a String array that has values of colors; the other, a Color array that …

Member Avatar for NormR1
0
180
Member Avatar for lse123
Member Avatar for NormR1
0
81
Member Avatar for ceyesuma

hello I need a temp fix for putting times into my form. I suspect that soon I will have to work with some kind of calender class that will send selected data in all the correct formats. I have no clue. BUT right now it stop me in the first …

0
65
Member Avatar for ceyesuma

MusicSys:unsolved: Hello Could someone tell me which (if any combination of code to use to put a date in a derby db using a JFormattedTextField? [code] createBooking ...etc ..., book_date DATE, ...., ... [/code] here are the many tries I have so far [code] if (i == 3) { //I …

Member Avatar for ceyesuma
0
622
Member Avatar for ceyesuma

MusicSys:unsolved JDesktop:JInternalFrame out of scope ///////////////////////////////////////// Hello; I Have a JDesktopPane that opens with a x frame (JInternalFrame)wit a JMenuBar and 11 JTabbedPanels .produced by x.class.I click the menuItem to produce z.frame using x.class a new JInternalFrame with 4 tabbedPanels on it again produced by x.class. Now I click on …

0
26
Member Avatar for plasticfood

[CODE]double wholeCost = kb.nextDouble(); double markupPercent = kb.nextDouble(); double markup = markupPercent/100.0; double retailT = calculateRetail(wholeCost, markup); System.out.println(retailT); public static double calculateRetail(double num1, double num2){ double markupPrice = ((num1 * num2)+ num1); return markupPrice;} [/CODE] i've been staring at this and can't figure what is wrong with it. the compiler …

Member Avatar for plasticfood
0
74
Member Avatar for rocky4everurs
Member Avatar for masijade
0
1K
Member Avatar for kezkez

Hi Everyone, I have to add a static method Account consolidate(Account acct1, Account acct2) to an existing Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should be returned. (only accounts with …

Member Avatar for vaibhav1983
0
1K
Member Avatar for Little Bunny

A question was asked to me which is as follow: There is a class Fruitlist which has a sub class apple and there is a class Fruit which has a sub class orange FruitList uses Fruit (* not sub classed, only uses it) and Apple uses Orange Is there something …

Member Avatar for vaibhav1983
0
120
Member Avatar for packetpirate

I'm trying to draw a string at the center of an applet. The problem is that it's STARTING to draw at the center of the applet and going off to the right. I need for the center of the string to be centered. Here's my code so far: [CODE] /** …

Member Avatar for NormR1
0
1K
Member Avatar for jemimaloh

Hi everyone, does anyone know how i might implement a 2D Vote table? Would using a 2D array for it be possible? I'm trying to implement a voting system for the indexes into hash table arrays. Any ideas?

Member Avatar for jemimaloh
0
105
Member Avatar for hany-h

Hi guys, I have a file named DrawPanel and this class is supposed to draw different shapes which i declared before by using mousedrag. I am not able to draw more thatn one shape and put them in an array.It seems that i don't know where to change the value …

Member Avatar for NormR1
0
275
Member Avatar for newbie_java

Hi! I am just a newbie here! I just wanna ask how to do the file handling in java applet? Do I have to do the certain policy/permission to perform it? If so, how would I do it? And another one, how can I close the APPLET WINDOW once I …

Member Avatar for NormR1
0
465
Member Avatar for hindu times

Hi there, I'm working on this page, which is built in Wordpress: [url]http://www.rjt-online.com/blog/[/url] As you can see I am displaying recent Twitter posts using Twitter's own JS code, which seems to work fine. Problem is, when you navigate away from the page, and come back to it (using browser back …

Member Avatar for hindu times
0
87
Member Avatar for Jawahar prabhu

Here the code for get three digit value 'n' and calculate r=2^n+1 then find that value 'r' is a prie or not, here i like store the integer value 'r' without exponential function and big Integer, please make a great help to me. thanks in advance.. import java.*; import java.io.*; …

Member Avatar for stultuske
0
136
Member Avatar for end3r

Hy, I have a .properties file with a key-value defined like this: [icode]my_property.value=text text text bla bla bla {0} qwerty {1}.[/icode] I need to know what class should I use if I want to read the value and insert parameters in {0} and {1}. In the past I used to …

Member Avatar for end3r
0
4K
Member Avatar for bops

Hello. When implementing a KeyListener in my application I have the following code. I have added the KeyListener to a JTextField control using addKeyListener(this) and the current class implements KeyListener. [CODE] @Override public void keyPressed(KeyEvent ev) { System.out.println("Pressed: "+ev.getKeyCode()); } @Override public void keyReleased(KeyEvent ev) { System.out.println("Released: "+ev.getKeyCode()); } @Override …

Member Avatar for bops
0
944
Member Avatar for Nidhi S.
Member Avatar for Eric Cute

Hi everyone. Im trying to upload a file to an ftp server. I found this code in the internet but its not working for me. Can anyone please tell me where the error is?? This is my code [code]import java.io.*; import org.apache.commons.io.FileUtils; import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; public class …

Member Avatar for Eric Cute
0
332
Member Avatar for OcarinaSensei

[url]https://www.edline.net/files/_IXADp_/d6877670786901263745a49013852ec4/ProgramAssignment2.pdf[/url] That is my assignment for AP Comp. Sci. Thanks in advance!

Member Avatar for coil
-1
129
Member Avatar for diyez treze

please help me to create a code for this using Bufferreader.. thanks Welcome to Nancy's Addition Tutorial Program! ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ Enter 2 3‐digit numbers please, separated by a space and press enter: 123 678 You requested the following operation: num1: 123 num2: + 678 ‐‐‐‐‐ 1st addition: last digit of each …

Member Avatar for NormR1
0
87
Member Avatar for Yutxz

Hey guys, I'm having a little trouble with my Java homework. So far I'm stuck on problem 3.5, C). My code so far is: [CODE]package multadd; /** * * @author Josh */ public class Main { public static void multadd (double a, double b, double c) { System.out.println ( a …

Member Avatar for Yutxz
0
135
Member Avatar for ceyezumma

///////////////////////////////////////////// make .jar runnable ////////////////////////////////////////// Hello; I can make a .jar from my program and move it to a folder in my progject but I would like to make it runnable. So I have shown the Command to make the -cmf (non runnable) .jar that works fine. I will show …

Member Avatar for ceyesuma
0
256
Member Avatar for ceyezumma

j ///////////////////////////////////////// Hello; I Have a JDesktopPane that opens with a x frame (JInternalFrame)wit a JMenuBar and 11 JTabbedPanels .produced by x.class.I click the menuItem to produce z.frame using x.class a new JInternalFrame with 4 tabbedPanels on it again produced by x.class. Now I click on x.frame and try to …

Member Avatar for ceyesuma
0
280
Member Avatar for steveh000

Hi Guys I am really green when it comes to regex , I have never had to use it much but here goes, I want to be able to remove html tags from a string so I am only left with the content. i am using [CODE] String.replaceAll("<(.|\n)*?>","");[/CODE] This doesnt …

Member Avatar for adams161
0
87
Member Avatar for GDICommander

Hello everyone! When I'm starting a OSGI bundle in my Apache Felix container, I have a ClassNotFoundException. This is the output that I have: [CODE] start file:/C:/Users/Pierre-Alexandre/Documents/NetBeansProjects/Prototype1/src/Prototype1Client.jar 23-Sep-2010 10:43:12 AM org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService bundleChanged INFO: bundle changed: null 23-Sep-2010 10:43:12 AM org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService bundleChanged INFO: bundle changed: null 23-Sep-2010 10:43:12 AM org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService bundleChanged …

Member Avatar for GDICommander
0
5K
Member Avatar for vinay1424

I am facing one problem in this type of pro-gramme where i use Class name as a Return type or pass object as an argument like here , i am getting same error(the class already defined), i am using eclipse. [CODE] ****class Test //showing error that the class Test already …

Member Avatar for NormR1
0
371
Member Avatar for bryans2010

There's something wrong with this code. I must implement the TestScores class, but I know I am missing something. /** TestScores class */ import java.util.Scanner; // Needed for the Scanner class // For use in CodeMate, the TestScores class is not declared to be // public. Normally the class header …

Member Avatar for NormR1
0
192
Member Avatar for Elsakom

Hi, I have recently embarked on an adventure into the programming world and am a 'newby' to java. Am trying to get 'my robot' to recgonise the difference between 'blue' and 'red', and execute commands - My program so far is the following - it's not recgonising the colour difference. …

Member Avatar for NormR1
0
96
Member Avatar for mrblippy

hi everyone, i am trying to write a java program that assigns a specified number of true values to random elements in an array. for example if i have a boolean array of 10 elements i would like 5 of these elements to be randomly assigned true values. im new …

Member Avatar for mrblippy
0
1K

The End.