New to Java and need help with error message!
I have just installed the oracle jdbc driver and am now getting the following error message when trying to use the jbdc driver instead of the jdbc:odbc wrap driver...
See com.borland.dx.dataset.DataSetException error code: BASE+47
com.borland.dx.dataset.DataSetException: Chain of 2 or more Exceptions occurred
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.throwExceptionChain(Unknown Source)
at com.borland.dx.sql.dataset.q.a(Unknown Source)
at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown Source)
at com.borland.dx.sql.dataset.o.a(Unknown Source)
at com.borland.dx.sql.dataset.o.d(Unknown Source)
at com.borland.dx.sql.dataset.o.f(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.open(Unknown Source)
at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:2749)
at com.borland.dbswing.JdbTable.setDataSet(JdbTable.java:819)
at myframes.ClaimView.btnSQL_actionPerformed(ClaimView.java:279)
at myframes.ClaimView_btnSQL_actionAdapter.actionPerformed(ClaimView.java:440)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Chained exception:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.borland.dx.sql.dataset.q.a(Unknown Source)
at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown Source)
at com.borland.dx.sql.dataset.o.a(Unknown Source)
at com.borland.dx.sql.dataset.o.d(Unknown Source)
at com.borland.dx.sql.dataset.o.f(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.open(Unknown Source)
at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:2749)
at com.borland.dbswing.JdbTable.setDataSet(JdbTable.java:819)
at myframes.ClaimView.btnSQL_actionPerformed(ClaimView.java:279)
at myframes.ClaimView_btnSQL_actionAdapter.actionPerformed(ClaimView.java:440)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Here is the code causeing the error;
void btnSQL_actionPerformed(ActionEvent e)
try
String GET_DATASET = txtSQL.getText().trim();
Display("Executing...");
try
MyDisplayTable.setDataSet(null);
catch (DataSetException ex)
Display("ERROR 1: " + ex.toString());
try
queryDataSet1.close();
catch (DataSetException ex)
Display("ERROR 2: " + ex.toString());
try
queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(
database1, GET_DATASET, null, true, Load.ALL));
catch (DataSetException ex)
Display("ERROR 3: " + ex.toString());
try
if (!queryDataSet1.isOpen()) {
queryDataSet1.open();
catch (DataSetException ex) {
Display("ERROR 5: " + ex.toString());
try {
queryDataSet1.refresh();
catch (Exception ex) {
Display("ERROR 5.5: " + ex.toString());
try {
Display("setDataSet");
MyDisplayTable.setDataSet(queryDataSet1);
Display("DONE setDataSet");
catch (DataSetException ex) {
Display("ERROR 6: " + ex.toString());
Display("Query: ' " + GET_DATASET.trim() + " ' was executed successfully");
catch (Exception ex)
Display(ex.toString());
Please let me know if more information is required. I am completely at a loss as to what more I need to do to get this to work using the new driver.
Thank you all in advance,
Malcolm Diaz
Application Developer
[email protected]
PlanVista Solutions Inc.
419 E.Main St.
Middletown NY 10940
845-346-2692
this is more of a jdbc question rather than an internationalization. You might be able to get more help if you post it in java programming section.
Similar Messages
-
New to Java and need help with this program..please!
I'd really appreciate any helpful comments about this program assignment that I have to turn in a week from Friday. I'm taking a class one night a week and completely new to Java. I'd ask my professor for help, but we can't call him during the week and he never answers e-mails. He didn't tell us how to call from other classes yet, and I just can't get the darn thing to do what I want it to do!
The assignment requirements are:
1. Change a card game application that draws two cards
and the higher card wins, to a Blackjack application
2. Include a new class called Hand
3. The Hand class should record the number of draws
4. The application should prompt for a number of draws
5. The game is played against the Dealer
6. The dealer always draws a card if the dealer's hand total is <= 17
7. Prompt the player after each hand if he wants to quit
8. Display the total games won by the dealer and total and the total games wond by the player after each hand
9. Display all of the dealer's and player's cards at the
end of each hand
10. Player has the option of drawing an additional card after the first two cards
11. The Ace can have a value of 11 or 1
(Even though it's not called for in the requirements, I would like to be able to let the Ace have a value of 1 or an 11)
The following is my code with some comments about a few things that are driving me nuts:
import java.util.*;
import javax.swing.*;
import java.text.*;
public class CardDeck
public CardDeck()
deck = new Card[52];
fill();
shuffle();
public void fill()
int i;
int j;
for (i = 1; i <= 13; i++)
for (j = 1; j <= 4; j++)
deck[4 * (i - 1) + j - 1] = new Card(i, j);
cards = 52;
public void shuffle()
int next;
for (next = 0; next < cards - 1; next++)
int rand = (int)(Math.random()*(next+1));
Card temp = deck[next];
deck[next] = deck[rand];
deck[rand] = temp;
public final Card draw()
if (cards == 0)
return null;
cards--;
return deck[cards];
public int changeValue()
int val = 0;
boolean ace = false;
int cds;
for (int i = 0; i < cards; i++)
if (cardValue > 10)
cardValue = 10;
if (cardValue ==1) {
ace = true;
val = val + cardValue;
if ( ace = true && val + 10 <= 21 )
val = val + 10;
return val;
public static void main(String[] args)
CardDeck d = new CardDeck();
int x = 3;
int i;
int wins = 1;
int playerTotal = 1;
do {
Card dealer = (d.draw());
/**I've tried everything I can think of to call the ChangeValue() method after I draw the card, but nothing is working for me.**/
System.out.println("Dealer draws: " + dealer);
do {
dealer = (d.draw());
System.out.println(" " + dealer);
}while (dealer.rank() <= 17);
Card mine = d.draw();
System.out.println("\t\t\t\t Player draws: "
+ mine);
mine = d.draw();
System.out.println("\t\t\t\t\t\t" + mine);
do{
String input = JOptionPane.showInputDialog
("Would you like a card? ");
if(input.equalsIgnoreCase("yes"))
mine = d.draw();
System.out.println("\t\t\t\t\t\t" + mine);
playerTotal++;
else if(input.equalsIgnoreCase("no"))
System.out.println("\t\t\t\t Player stands");
else
System.out.println("\t\tInvalid input.
Please try again.");
I don't know how to go about making and calling a method or class that will combine the total cards delt to the player and the total cards delt to the dealer. The rank() method only seems to give me the last cards drawn to compare with when I try to do the tests.**/
if ((dealer.rank() > mine.rank())
&& (dealer.rank() <= 21)
|| (mine.rank() > 21)
&& (dealer.rank() < 22)
|| ((dealer.rank() == 21)
&& (mine.rank() == 21))
|| ((mine.rank() > 21)
&& (dealer.rank() <= 21)))
System.out.println("Dealer wins");
wins++;
else
System.out.println("I win!");
break;
} while (playerTotal <= 1);
String stop = JOptionPane.showInputDialog
("Would you like to play again? ");
if (stop.equalsIgnoreCase("no"))
break;
if (rounds == 5)
System.out.println("Player wins " +
(CardDeck.rounds - wins) + "rounds");
} while (rounds <= 5);
private Card[] deck;
private int cards;
public static int rounds = 1;
public int cardValue;
/**When I try to compile this nested class, I get an error message saying I need a brace here and at the end of the program. I don't know if any of this code would work because I've tried adding braces and still can't compile it.**/
class Hand()
static int r = 1;
public Hand() { CardDeck.rounds = r; }
public int getRounds() { return r++; }
final class Card
public static final int ACE = 1;
public static final int JACK = 11;
public static final int QUEEN = 12;
public static final int KING = 13;
public static final int CLUBS = 1;
public static final int DIAMONDS = 2;
public static final int HEARTS = 3;
public static final int SPADES = 4;
public Card(int v, int s)
value = v;
suit = s;
public int getValue() { return value; }
public int getSuit() { return suit; }
public int rank()
if (value == 1)
return 4 * 13 + suit;
else
return 4 * (value - 1) + suit;
/**This works, but I'm confused. How is this method called? Does it call itself?**/
public String toString()
String v;
String s;
if (value == ACE)
v = "Ace";
else if (value == JACK)
v = "Jack";
else if (value == QUEEN)
v = "Queen";
else if (value == KING)
v = "King";
else
v = String.valueOf(value);
if (suit == DIAMONDS)
s = "Diamonds";
else if (suit == HEARTS)
s = "Hearts";
else if (suit == SPADES)
s = "Spades";
else
s = "Clubs";
return v + " of " + s;
private int value; //Value is an integer, so how can a
private int suit; //string be assigned to an integer?
}Thank you so much for offering to help me with this Jamie! When I tried to call change value using:
Card dealer = (d.changeValue());
I get an error message saying:
Incompatible types found: int
required: Card
I had my weekly class last night and the professor cleared up a few things for me, but I've not had time to make all of the necessary changes. I did find out how toString worked, so that's one question out of the way, and he gave us a lot of information for adding another class to generate random numbers.
Again, thank you so much. I really want to learn this but I'm feeling so stupid right now. Any help you can give me about the above error message would be appreciated. -
Need help with error message 213:8
Need help with error message 213:8, this error message prompted after re-installing CS5.5 on the same machine (W7 Pro)
Thanks.Hi TKA_,
Please try the solutions mentioned on following forum thread.
http://support.muse.adobe.com/thread/1305941?start=0&tstart=0
Let me know if it works?
Regards,
Sumit Singh -
Dvd burn error--need help with error message
Ok so I have read all the support articles and many of the discussions already posted...but still can not burn a dvd.
so, I created a project on idvd, it just has two slideshows that I imported from iphoto. I could not burn the dvd directly from idvd, got the multiplexing/burn error message. I successfully created a disk image and was able to play it on my computer using the dvd player, I then tried to burn it using the disk utility and again got an error message after it started the writing proccess...the error said "The devise failed to calibrate the laser power level for this media" Does anyone know what this means??? I have lots of room on my hard drive and am using DVD-R sony dvds. Any help would be greatly appreciated!!!Hi Becca:
Just click on the little in the upper left-hand corner, click ' About this Mac', More Info..and open your System Profiler. Under ATA you should se something like this:
MATSHITA DVD-R UJ-825:
Manufacturer: MATSHITA
Model: MATSHITA DVD-R UJ-825
Revision: DBN7
Serial Number:
---> Drive Type: CD-RW/DVD-RW
Disc Burning: Apple Supported/Shipped
Removable Media: Yes
Detachable Drive: No
Protocol: ATAPI
Unit Number: 0
Socket Type: Internal
That will tell you.
Sue -
New to Macs and need help with communication error in video chat
Hello! I have the same problem with video chatting that many others are having with errors -7 and -8. I am brand new to macs, and while I understand what the other threads are talking about about changing ports and settings, I don't exactly know how to do those things on my new system (iMac with OS X tiger 10.4.8). My quicktime settings are set to 1.5 and my iChat port is changed to 443. I have been able to connect with one person via iChat video on a different network, but I was given the above errors when I tried to connect with someone else tonight. I am using my built in airport with a Lynksys WRT54G broadband router. Please let me know how I can go about fixing this problem. Thank you!
here is the full error message:
Date/Time: 2007-06-14 20:23:30.478 -0400
OS Version: 10.4.9 (Build 8P2137)
Report Version: 4
iChat Connection Log:
AVChat started with ID 606431946.
prettyinpink93873: State change from AVChatNoState to AVChatStateWaiting.
0x10850570: State change from AVChatNoState to AVChatStateInvited.
0x10850570: State change from AVChatStateInvited to AVChatStateConnecting.
prettyinpink93873: State change from AVChatStateWaiting to AVChatStateConnecting.
prettyinpink93873: State change from AVChatStateConnecting to AVChatStateEnded.
Chat ended with error -8
0x10850570: State change from AVChatStateConnecting to AVChatStateEnded.
Chat ended with error -8
Video Conference Error Report:
Video Conference Support Report:
Video Conference User Report:
Binary Images Description for "iChat":
0x1000 - 0x17dfff com.apple.iChat 3.1.8 (445) /Applications/iChat.app/Contents/MacOS/iChat
0xda4c000 - 0xda4efff com.apple.AutomatorCMM 1.0.1 (87) /System/Library/Contextual Menu Items/AutomatorCMM.plugin/Contents/MacOS/AutomatorCMM
0xda52000 - 0xda56fff com.apple.FolderActionsMenu 1.3.1 /System/Library/Contextual Menu Items/FolderActionsMenu.plugin/Contents/MacOS/FolderActionsMenu
0xda5b000 - 0xda5bfff com.apple.SpotLightCM 1.0 (121.36) /System/Library/Contextual Menu Items/SpotlightCM.plugin/Contents/MacOS/SpotlightCM
0xdd05000 - 0xdd0efff com.apple.IOFWDVComponents 1.9.0 /System/Library/Components/IOFWDVComponents.component/Contents/MacOS/IOFWDVComp onents
0xdd2a000 - 0xdd2ffff com.apple.audio.AppleHDAHALPlugIn 1.2.9 (1.2.9a4) /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bun dle/Contents/MacOS/AppleHDAHALPlugIn
0xdd4d000 - 0xdd89fff com.apple.QuickTimeFireWireDV.component 7.1.3 /System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/QuickTim eFireWireDV
0xdd95000 - 0xddc5fff com.apple.QuickTimeIIDCDigitizer 7.1.3 /System/Library/QuickTime/QuickTimeIIDCDigitizer.component/Contents/MacOS/Quick TimeIIDCDigitizer
0xddcf000 - 0xde0bfff com.apple.QuickTimeUSBVDCDigitizer 1.7.5 /System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/Qui ckTimeUSBVDCDigitizer
0xde2f000 - 0xdf88fff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
0xdfb4000 - 0xe1a2fff com.apple.ATIRadeonX1000GLDriver 1.4.52 (4.5.2) /System/Library/Extensions/ATIRadeonX1000GLDriver.bundle/Contents/MacOS/ATIRade onX1000GLDriver
0xe1de000 - 0xe1fafff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLDriver.bundl e/GLDriver
0xe201000 - 0xe225fff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLRendererFloa t.bundle/GLRendererFloat
0xe4b2000 - 0xe4b5fff com.apple.audio.AudioIPCPlugIn 1.0.2 /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugI n.bundle/Contents/MacOS/AudioIPCPlugIn
0xe4d1000 - 0xe4fbfff com.apple.audio.SoundManager.Components 3.9.2 /System/Library/Components/SoundManagerComponents.component/Contents/MacOS/Soun dManagerComponents
0xe78f000 - 0xe7a8fff com.apple.AppleIntermediateCodec 1.1 (141) /Library/QuickTime/AppleIntermediateCodec.component/Contents/MacOS/AppleInterme diateCodec
0xe7ad000 - 0xe7c6fff com.apple.applepixletvideo 1.2.9 (1.2d9) /System/Library/QuickTime/ApplePixletVideo.component/Contents/MacOS/ApplePixlet Video
0xf905000 - 0xf908fff com.apple.iokit.IOQTComponents 1.4 /System/Library/Components/IOQTComponents.component/Contents/MacOS/IOQTComponen ts
0x8fe00000 - 0x8fe4afff dyld /usr/lib/dyld
0x90000000 - 0x90172fff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x901c2000 - 0x901c4fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
0x901c6000 - 0x90203fff com.apple.CoreText 1.1.2 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreText.framework/Versions/A/CoreText
0x9022a000 - 0x90300fff com.apple.ApplicationServices.ATS 2.0.6 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/ATS
0x90320000 - 0x90775fff com.apple.CoreGraphics 1.258.61 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics
0x9080c000 - 0x908d4fff com.apple.CoreFoundation 6.4.7 (368.28) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x90912000 - 0x90912fff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x90914000 - 0x90a07fff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x90a57000 - 0x90ad6fff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x90aff000 - 0x90b63fff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib
0x90bd2000 - 0x90bd9fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib
0x90bde000 - 0x90c51fff com.apple.framework.IOKit 1.4.6 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90c66000 - 0x90c78fff libauto.dylib /usr/lib/libauto.dylib
0x90c7e000 - 0x90f24fff com.apple.CoreServices.CarbonCore 682.18 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
0x90f67000 - 0x90fcffff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
0x91008000 - 0x91046fff com.apple.CFNetwork 129.20 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwo rk.framework/Versions/A/CFNetwork
0x91059000 - 0x91069fff com.apple.WebServices 1.1.3 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServ icesCore.framework/Versions/A/WebServicesCore
0x91074000 - 0x910f3fff com.apple.SearchKit 1.0.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchK it.framework/Versions/A/SearchKit
0x9112d000 - 0x9114bfff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadat a.framework/Versions/A/Metadata
0x91157000 - 0x91165fff libz.1.dylib /usr/lib/libz.1.dylib
0x91168000 - 0x91307fff com.apple.security 4.5.2 (29774) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x91405000 - 0x9140dfff com.apple.DiskArbitration 2.1.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x91414000 - 0x9143afff com.apple.SystemConfiguration 1.8.6 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfi guration
0x9144c000 - 0x91453fff libbsm.dylib /usr/lib/libbsm.dylib
0x91457000 - 0x914cdfff com.apple.audio.CoreAudio 3.0.4 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x9151e000 - 0x9151efff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Application Services
0x91520000 - 0x9154cfff com.apple.AE 314 (313) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ AE.framework/Versions/A/AE
0x9155f000 - 0x91633fff com.apple.ColorSync 4.4.9 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/ColorSync
0x9166e000 - 0x916e1fff com.apple.print.framework.PrintCore 4.6 (177.13) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore
0x9170f000 - 0x917b8fff com.apple.QD 3.10.24 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ QD.framework/Versions/A/QD
0x917de000 - 0x91829fff com.apple.HIServices 1.5.2 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices
0x91848000 - 0x9185efff com.apple.LangAnalysis 1.6.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis
0x9186a000 - 0x91885fff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ FindByContent.framework/Versions/A/FindByContent
0x91890000 - 0x918cdfff com.apple.LaunchServices 182 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LaunchServices.framework/Versions/A/LaunchServices
0x918e1000 - 0x918edfff com.apple.speech.synthesis.framework 3.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x918f4000 - 0x91933fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/ImageIO
0x91946000 - 0x919f8fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib
0x91a3e000 - 0x91a54fff libcups.2.dylib /usr/lib/libcups.2.dylib
0x91a59000 - 0x91a77fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x91a7c000 - 0x91adbfff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x91aed000 - 0x91af1fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x91af3000 - 0x91b77fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libRaw.dylib
0x91b7b000 - 0x91bb8fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x91bbe000 - 0x91bd8fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libPng.dylib
0x91bdd000 - 0x91bdffff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x91be1000 - 0x91cbffff libxml2.2.dylib /usr/lib/libxml2.2.dylib
0x91cdc000 - 0x91cdcfff com.apple.Accelerate 1.3.1 (Accelerate 1.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x91cde000 - 0x91d6cfff com.apple.vImage 2.5 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.fr amework/Versions/A/vImage
0x91d73000 - 0x91d73fff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/vecLib
0x91d75000 - 0x91dcefff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvMisc.dylib
0x91dd7000 - 0x91dfbfff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvDSP.dylib
0x91e03000 - 0x9220cfff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libBLAS.dylib
0x92246000 - 0x925fafff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libLAPACK.dylib
0x92627000 - 0x92714fff libiconv.2.dylib /usr/lib/libiconv.2.dylib
0x92716000 - 0x92793fff com.apple.DesktopServices 1.3.6 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Desk topServicesPriv
0x927d4000 - 0x92a04fff com.apple.Foundation 6.4.8 (567.29) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x92b1e000 - 0x92b35fff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x92b40000 - 0x92b98fff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x92bac000 - 0x92bacfff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x92bae000 - 0x92bbefff com.apple.ImageCapture 3.0.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture. framework/Versions/A/ImageCapture
0x92bcd000 - 0x92bd5fff com.apple.speech.recognition.framework 3.6 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogni tion.framework/Versions/A/SpeechRecognition
0x92bdb000 - 0x92be1fff com.apple.securityhi 2.0.1 (24742) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.fr amework/Versions/A/SecurityHI
0x92be7000 - 0x92c78fff com.apple.ink.framework 101.2.1 (71) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework /Versions/A/Ink
0x92c8c000 - 0x92c90fff com.apple.help 1.0.3 (32.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framewor k/Versions/A/Help
0x92c93000 - 0x92cb1fff com.apple.openscripting 1.2.5 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting .framework/Versions/A/OpenScripting
0x92cc3000 - 0x92cc9fff com.apple.print.framework.Print 5.2 (192.4) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framewo rk/Versions/A/Print
0x92ccf000 - 0x92d32fff com.apple.htmlrendering 66.1 (1.1.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering .framework/Versions/A/HTMLRendering
0x92d59000 - 0x92d9afff com.apple.NavigationServices 3.4.4 (3.4.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationSer vices.framework/Versions/A/NavigationServices
0x92dc1000 - 0x92dcffff com.apple.audio.SoundManager 3.9.1 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.f ramework/Versions/A/CarbonSound
0x92dd6000 - 0x92ddbfff com.apple.CommonPanels 1.2.3 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels. framework/Versions/A/CommonPanels
0x92de0000 - 0x930d5fff com.apple.HIToolbox 1.4.9 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
0x931db000 - 0x931e6fff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x931eb000 - 0x93206fff com.apple.DirectoryService.Framework 3.2 /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryServi ce
0x93256000 - 0x93256fff com.apple.Cocoa 6.4 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x93258000 - 0x9390efff com.apple.AppKit 6.4.8 (824.42) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x93c8f000 - 0x93d0afff com.apple.CoreData 91 (92.1) /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x93d43000 - 0x93dfdfff com.apple.audio.toolbox.AudioToolbox 1.4.5 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x93e40000 - 0x93e40fff com.apple.audio.units.AudioUnit 1.4.2 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x93e42000 - 0x94003fff com.apple.QuartzCore 1.4.12 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x94049000 - 0x9408afff libsqlite3.0.dylib /usr/lib/libsqlite3.0.dylib
0x94092000 - 0x940ccfff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dyl ib
0x940d1000 - 0x940e2fff com.apple.CoreVideo 1.4 /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x94126000 - 0x9416efff com.apple.bom 8.5 (86.3) /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x94178000 - 0x941b6fff com.apple.vmutils 4.0.2 (93.1) /System/Library/PrivateFrameworks/vmutils.framework/Versions/A/vmutils
0x941fa000 - 0x9420bfff com.apple.securityfoundation 2.2.1 (28150) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoun dation
0x94219000 - 0x94257fff com.apple.securityinterface 2.2.1 (27695) /System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInter face
0x94273000 - 0x94282fff com.apple.CoreGraphics 1.258.61 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x94289000 - 0x94294fff com.apple.CoreGraphics 1.258.61 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x942e0000 - 0x942fafff com.apple.CoreGraphics 1.258.61 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x94300000 - 0x945bafff com.apple.QuickTime 7.1.3 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x9471e000 - 0x94864fff com.apple.AddressBook.framework 4.0.4 (485.1) /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook
0x948f0000 - 0x948fffff com.apple.DSObjCWrappers.Framework 1.1 /System/Library/PrivateFrameworks/DSObjCWrappers.framework/Versions/A/DSObjCWra ppers
0x94906000 - 0x9492ffff com.apple.LDAPFramework 1.4.2 (69.1.1) /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
0x94935000 - 0x94944fff libsasl2.2.dylib /usr/lib/libsasl2.2.dylib
0x94948000 - 0x9496dfff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib
0x94979000 - 0x94996fff libresolv.9.dylib /usr/lib/libresolv.9.dylib
0x9499d000 - 0x94a03fff com.apple.Bluetooth 1.7.14 (1.7.14f14) /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
0x94cc2000 - 0x94d54fff com.apple.WebKit 419 /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
0x94dae000 - 0x94e30fff com.apple.JavaScriptCore 418.3 /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCor e.framework/Versions/A/JavaScriptCore
0x94e69000 - 0x95148fff com.apple.WebCore 418.21 /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore
0x952c7000 - 0x952eafff libxslt.1.dylib /usr/lib/libxslt.1.dylib
0x96471000 - 0x96471fff com.apple.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x96958000 - 0x9697afff com.apple.speech.LatentSemanticMappingFramework 2.5 /System/Library/PrivateFrameworks/LatentSemanticMapping.framework/Versions/A/La tentSemanticMapping
0x969eb000 - 0x96ac2fff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgramma bility.dylib
0x96add000 - 0x96adefff com.apple.opengl 1.4.16 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLSystem.dy lib
0x96ae0000 - 0x96ae5fff com.apple.agl 2.5.9 (AGL-2.5.9) /System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x96c3c000 - 0x96c3cfff com.apple.MonitorPanelFramework 1.1.1 /System/Library/PrivateFrameworks/MonitorPanel.framework/Versions/A/MonitorPane l
0x9739e000 - 0x97487fff com.apple.viceroy.framework 278.2 /System/Library/PrivateFrameworks/VideoConference.framework/Versions/A/VideoCon ference
0x97bcb000 - 0x97bcdfff com.apple.DisplayServicesFW 1.8.2 /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayS ervices
0x97dfa000 - 0x988dafff com.apple.QuickTimeComponents.component 7.1.3 /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTim eComponents
0x98aea000 - 0x98aecfff com.apple.QuickTimeH264.component 7.1.3 /System/Library/QuickTime/QuickTimeH264.component/Contents/MacOS/QuickTimeH264
0x98aee000 - 0x98c97fff com.apple.QuickTimeH264.component 7.1.3 /System/Library/QuickTime/QuickTimeH264.component/Contents/Resources/QuickTimeH 264.scalar
0x98d07000 - 0x98dc4fff com.apple.QuickTimeMPEG4.component 7.1.3 /System/Library/QuickTime/QuickTimeMPEG4.component/Contents/MacOS/QuickTimeMPEG 4
0x9923b000 - 0x99246fff com.apple.IMFramework 3.1.4 (429) /System/Library/Frameworks/InstantMessage.framework/Versions/A/InstantMessage
0x99250000 - 0x993bcfff com.apple.MessageFramework 2.1.1 (752.3) /System/Library/Frameworks/Message.framework/Versions/B/Message -
I'm new to java and need help please
I have an assignment involves modifying a previous assignment. the code for the previous assigment is shown below.(it was required to be done as an applet this assigment can be an application or an applet) I'm trying to modify this code to read a text file (items.txt) that looks like this:
item # description price(this line does not appear in the text file)
001 shaving cream 400.00
999 razors 30.00
I need to load the item# and price from the text file into arrays(I have no clue how to use multi-dimensional arrays in java and would prefer not to)
I need to search the arrays based on the values entered by the user (item # and quantity) calculate the total for that item then create a new text file which has each line item for that order in the form:
item# quant price per item total(price per item*quant entered)
also also I need to be able to display the four items listed above after each loop as well as all the previous item number and quantities they selected until they indicate they don't want to select anymore.
I've been working on this for days and it seems like nothing I try works. My major problems are:
1. I have no idea how to read the text file and load those 2 items into their respective arrays
2. I can't seem to create a textfile that looks like text for the output file.
code]
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;
import java.util.Locale;
public class arraySelection
extends JApplet {
//Initialize the applet
private Container getContentPane=null;
public void init() {
String string_item, string_quantity;
String output = "";
String description= "";
int counter= 0;
int itemNumber= 0;
double quantity = 0 ;
double tax_rate=.07;
double total= 0, price= 0;
double tax, subtotal;
double Pretotal= 0;
double priceArray[] = {1, .5, 3.65, 0.02, 0.09};
String descriptionArray[] = {"salt", "pepper", "paprika", "garlic", "thyme"};
// create number format for currency in US dollar format
NumberFormat moneyFormat = NumberFormat.getCurrencyInstance( Locale.US );
//format to have the total with two digits precision
DecimalFormat twoDigits = new DecimalFormat("0.00");
//Jtextarea to display results
JTextArea outputArea = new JTextArea ();
// get applet's content pane
Container container = getContentPane ();
//attach output area to container
container.add(outputArea);
//set the first row of text for the output area
output += "Invoice\nItem#\tDescription\tQuant@Price\t Line Total" + "\n";
do //begin loop structure obtain input from user
// obtain item number from user
string_item = JOptionPane.showInputDialog(
"Please enter an item number 1, 2, 3, 4, or 5:");
//obtain quantity of each item that user enter
string_quantity = JOptionPane.showInputDialog("Enter the quantity:");
// convert numbers from type String to Integer or Double
itemNumber = Integer.parseInt(string_item);
quantity = Double.parseDouble(string_quantity);
switch (itemNumber) {//Determine input from user to assign price and description
case 10: // user input item =10
price = priceArray[0];
description = descriptionArray[0];
break;
case 20: // user input item =20
price = priceArray [1];
description = descriptionArray[1];
break;
case 30: //user input item =30
price=priceArray[2];
description = descriptionArray[2];
break;
case 40: //user input item =40
price=priceArray[3];
description = descriptionArray[3];
break;
case 50: //user input item =50
price=priceArray[4];
description = descriptionArray[4];
break;
default: // user input item is not on the list
output += "Invalid value entered"+ "\n";
price=0;
description= "";
//Calculates the total for each item number and stores it in subtotal
subtotal = price * quantity;
//display input from user
output += itemNumber + "\t" + description + "\t\t"+ quantity + "@" +
moneyFormat.format( price) + "\t" + moneyFormat.format( subtotal) + "\n";
//accumulates the overall subtotal for all items
Pretotal = Pretotal + subtotal;
//verifies that the user wants to stop entering data
string_item = JOptionPane.showInputDialog(" Enter a positive integer to continue or 0 to stop. ");
itemNumber = Integer.parseInt(string_item);
// loop termination condition if user's input is 0 .It will end the loop
} while ( itemNumber!= 0);
tax = Pretotal * tax_rate; // calculate tax amount
total = Pretotal + tax; //calculate total = subtotal + tax
//appends data regarding the subtotal, tax, and total to the output area
output += "\n" + "Order Subtotal" + "\t" + moneyFormat.format( Pretotal) +
"\n" + "Tax" + "\t\t" + twoDigits.format( tax ) + "\n" + "Order Total" +
"\t\t" + moneyFormat.format( total );
//attaches the data in the output variable to the output area
outputArea.setText( output );
} //end init
}// end applet Invoice
Any help or sugestions would be greatly appreaciated. I've been working on this for over a week and everything I try goes nowhere.item # description price(this
line does not appear in the text file)
001 shaving cream 400.00
999 razors 30.00
I need to load the item# and price from the text file
into arrays(I have no clue how to use
multi-dimensional arrays in java and would prefer not
to)That's good, because you shouldn't use multidimensional arrays here. You should have a one-dimensional array (or java.util.List) of objects that encapsulate each line.
I've been working on this for days and it seems like
nothing I try works. My major problems are:
1. I have no idea how to read the text file and load
those 2 items into their respective arrays
2. I can't seem to create a textfile that looks like
text for the output file.The java.io package has file reading/writing classes.
Here's a tutorial:
http://java.sun.com/docs/books/tutorial/essential/io/index.html -
I'm new to java and need help please(repost)
I have an assignment involves modifying a previous assignment. the code for the previous assigment is shown below.(it was required to be done as an applet this assigment can be an application or an applet) I'm trying to modify this code to read a text file (items.txt) that looks like this:
item # description price(this line does not appear in the text file)
001 shaving cream 400.00
999 razors 30.00
I need to load the item# and price from the text file into arrays(I have no clue how to use multi-dimensional arrays in java and would prefer not to)
I need to search the arrays based on the values entered by the user (item # and quantity) calculate the total for that item then create a new text file which has each line item for that order in the form:
item# quant price per item total(price per item*quant entered)
also also I need to be able to display the four items listed above after each loop as well as all the previous item number and quantities they selected until they indicate they don't want to select anymore.
I've been working on this for days and it seems like nothing I try works. My major problems are:
1. I have no idea how to read the text file and load those 2 items into their respective arrays
2. I can't seem to create a textfile that looks like text for the output file.
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;
import java.util.Locale;
public class arraySelection
extends JApplet {
//Initialize the applet
private Container getContentPane=null;
public void init() {
String string_item, string_quantity;
String output = "";
String description= "";
int counter= 0;
int itemNumber= 0;
double quantity = 0 ;
double tax_rate=.07;
double total= 0, price= 0;
double tax, subtotal;
double Pretotal= 0;
double priceArray[] = {1, .5, 3.65, 0.02, 0.09};
String descriptionArray[] = {"salt", "pepper", "paprika", "garlic", "thyme"};
// create number format for currency in US dollar format
NumberFormat moneyFormat = NumberFormat.getCurrencyInstance( Locale.US );
//format to have the total with two digits precision
DecimalFormat twoDigits = new DecimalFormat("0.00");
//Jtextarea to display results
JTextArea outputArea = new JTextArea ();
// get applet's content pane
Container container = getContentPane ();
//attach output area to container
container.add(outputArea);
//set the first row of text for the output area
output += "Invoice\nItem#\tDescription\tQuant@Price\t Line Total" + "\n";
do //begin loop structure obtain input from user
// obtain item number from user
string_item = JOptionPane.showInputDialog(
"Please enter an item number 1, 2, 3, 4, or 5:");
//obtain quantity of each item that user enter
string_quantity = JOptionPane.showInputDialog("Enter the quantity:");
// convert numbers from type String to Integer or Double
itemNumber = Integer.parseInt(string_item);
quantity = Double.parseDouble(string_quantity);
switch (itemNumber) {//Determine input from user to assign price and description
case 10: // user input item =10
price = priceArray[0];
description = descriptionArray[0];
break;
case 20: // user input item =20
price = priceArray [1];
description = descriptionArray[1];
break;
case 30: //user input item =30
price=priceArray[2];
description = descriptionArray[2];
break;
case 40: //user input item =40
price=priceArray[3];
description = descriptionArray[3];
break;
case 50: //user input item =50
price=priceArray[4];
description = descriptionArray[4];
break;
default: // user input item is not on the list
output += "Invalid value entered"+ "\n";
price=0;
description= "";
//Calculates the total for each item number and stores it in subtotal
subtotal = price * quantity;
//display input from user
output += itemNumber + "\t" + description + "\t\t"+ quantity + "@" +
moneyFormat.format( price) + "\t" + moneyFormat.format( subtotal) + "\n";
//accumulates the overall subtotal for all items
Pretotal = Pretotal + subtotal;
//verifies that the user wants to stop entering data
string_item = JOptionPane.showInputDialog(" Enter a positive integer to continue or 0 to stop. ");
itemNumber = Integer.parseInt(string_item);
// loop termination condition if user's input is 0 .It will end the loop
} while ( itemNumber!= 0);
tax = Pretotal * tax_rate; // calculate tax amount
total = Pretotal + tax; //calculate total = subtotal + tax
//appends data regarding the subtotal, tax, and total to the output area
output += "\n" + "Order Subtotal" + "\t" + moneyFormat.format( Pretotal) +
"\n" + "Tax" + "\t\t" + twoDigits.format( tax ) + "\n" + "Order Total" +
"\t\t" + moneyFormat.format( total );
//attaches the data in the output variable to the output area
outputArea.setText( output );
} //end init
}// end applet InvoiceAny help or sugestions would be greatly appreaciated. I've been working on this for over a week and everything I try goes nowhere.First answer: You shouldn't ask multiple questions in the same thread. Ask a specific question, with an appropriate subject line (optionally, assign the number of Dukes you are willing to give for the help). When question #1 is answered and question #2 arises, it's time for a new thread (don't forget to give out Dukes before moving on).
Second answer: I think you need a Transfer Object (http://java.sun.com/blueprints/patterns/TransferObject.html). It's whole purpose is to hold/transfer instance data where it is needed. Create a class something like this:
public class ItemTO
private String _number;
private String _description;
private double _price;
public ItemTO( String number, String description, double price )
_number = number;
_description = description;
_price = price
// Getter/Setter methods go here
}then, in the code where you read in the file do something like this:
BufferedReader input = null;
try
input = new BufferedReader( new FileReader( "c:\\a.txt" ) );
List items = new ArrayList();
String line;
String itemNumber;
String itemDescription;
double itemPrice;
while ( (line = input.readLine() ) != null )
System.out.println( line );
itemNumber = // Parse it from line
itemDescription // Parse it from line
itemPrice = // Parse it from line
items.add( new ItemTO( itemNumber, itemDescription, itemPrice ) );
catch ( FileNotFoundException fnfe )
fnfe.printStackTrace();
catch ( IOException ioe )
ioe.printStackTrace();
finally
try
if ( input != null )
input.close();
catch ( Exception e )
e.printStackTrace();
}As for how to parse the line of the file, I'll leave that to you for now. Are the three values delimited with any special characters?
jbisotti -
Need help with error message after failed iSync: Leopard and Palm OS
I recently upgraded to a new computer which came with Leopard installed. In my old computer, Tiger OS, all was well when syncing to my Palm device.
I tried going from handheld to desktop with slow synch turned on in iSync and now I get this message re: failure--
"iSync Conduit starting 9/6/08 8:21:12 AM
Timeout waiting for Sync Engine, exiting 9/6/08 8:27:31 AM
iSync Conduit synchronization failed
“iSync Conduit” failed (error = #-2)"
Any ideas--please help.I wish you success.
I have an older Palm, the Zire. Once I got the most recent Palm software and chose, at least for now, to use iSync, I haven't noticed any problems.
Since I haven't used the "T" family of Palms, I can only guess that the process is much the same as with the Zire. You can disable the MAc syncing, move your currently disabled conduits back into Palm syncing, reinstall what Palm lists as your most recent software (and make sure all of your calendar and contacts info is just as you want it), do a sync through the HotSync Manager (ignoring iCal). I'd do a restart just to clear the system. It appears there is a warning note on resetting the iSync history, so you might not want to do that but just manually clean up any inconsistencies in iCal before you try once again.
[I actually wanted to just accept my Palm calendar so trashed my iCal calendar after some questionable syncs, but you can do an export to save the iCal calendar before you wipe it out.]
But my impression is that to get pass the messages you initially wrote up, you'll have to ask the Palm discussions folks for help. They are very helpful.
ec -
New to Dreamweaver and need help with fomatting font
Hi, I am new to dreamweaver and have been playing with it for a few weeks. I have Dreamweaver CS5.5 and I am making some detailed html templates for my ebay listings. I have created my tables, graphics, and colors but I am having trouble with my font formatting. Everything is looking really good, but there are a few sentences and even just a few phrases that I want to underline but when I add a text decloration and underline, it just underlines the whole area of sentenses not the specific one that I highlited. I know how to create a h1, h2, h3 etc code and add underline to it, but I don't want to have to format a h1 or h2 tag everything I want to format a little line. The reason I have been doing this is because It really is one of the only ways I have been able to figure out how to underline something. I watched some tutorials which is how I learned this. I figured out in the properties Panel on bottom of page to click on the CSS rule to create certain codes and such, but I am not sure how to do this. I tried one thing which was where it says target rule, I clicked new CSS Rule and then in then in the CSS Styles Panel on right side of screen I selected add property which I was then able to do a text decloration and underline, but it underlines many more sentenses than I am wanting or have selected. Please help so I am able to specifically choose how to underline just a word or two, and even to have just a word or two specifiaclly be a certain font, size or color. I am able to find ways to make this work on words as a whole, but not individual words or phrases.
Thanks for any help its really appreciated!
RylanBear in mind that an underlined word or phrase on the web means a clickable link to most people.
So, if you want to draw attention to something on screen, use anything (font size, color etc) except for an underline.
text-decoration: underline; is only used in CSS for styling clickable links. Not for regular text.
One option is to use the HTML <span> tag combined with CSS.
CSS
.important {
font-size: 14px;
color: red;
<p>This sentence contains a really <span class="important">important</span> word</p> -
New to Blackberry and need help with calendar
Hi all,
Just got my very first BB and could do with some help with my laptop and calendar (don't know if what I want is possible or available, so sorry it its not )
I got my BB for my personel use and want to be able to sync it with a calendar on my laptop. I don't have microsoft outlook, so I was wondering if anyone knew of a application or download I can get that will give me a calendar on my Laptop that I can sync with my BB.
Many thanks
Abi
Solved!
Go to Solution.Abi, welcome to the Forums.
Google Calendar sync is a perfect option.
http://www.google.com/mobile/blackberry/sync.html
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
Need Help with error message on the Network Systems Preferences, Please
In Systems Preference, > Network, I get the error message "Your network settings been changed by another application," with an active OK button. However, when I click the OK button, it persists and does not allow me to access the screen. The only way to end this is to force quit Systems Preferences.
Do you have any idea what is causing this freeze? I have a TimeWarner Internet connection (which I want to change to Verizon as soon as I resolve this). For a while I had Earthlink DSL which didn't work well at all. Could it be something with the not-used Earthlink or the current TimeWarner?
Any ideas about the cause and, more importantly, the solution?
Thanks,
JeanieMy computers have not been networked, intentionally. I like having them autonomous. So I have a separate Internet connection for each. And maybe that's what I need to maintain.
In the house is a Mac Mini and the house phone with new Verizon modem. In the separate office, I have my G5 tower, which is really my main computer.
Was just on phone with Verizon Tech who did say that they do not support Mac. They made a decision not to because there are fewer of us. However, I can purchase a premium support which appears to cover such support.
I've not seen the Verizon commercials, but I expect that they are filled with hype. The one I laugh at the most on the FIOS cable video is that they call their cable user interface "intuitive." -
Need help with error message-Element SENDERBUSINESSNAME is undefined in MSG
Hi,
I am brand new to ColdFusion and am using a pre-built form for a contact form on a client's site. I added the additional field business name and must have missed something - any ideas on where I would need to define the element would be appreciated.
Thanks
MaggieTroubleshooting technique number 1 - look at your data. In this case, either msg doesn't exist, or it doesn't contain anything named senderbusinessname. Run the following line somewhere before the error occurs.
<cfdump var="#msg#"> -
Extended Program check: Need help with error messages
Hi,
I am getting the following error message several time on different internal table declarations:
"Tables with headers are no longer supported in the OO context."
This is the data declaration that it refers to:
I_ZDAILY_MVMT TYPE TABLE OF ZDAILY_MVMT WITH HEADER LINE.
Also, I am getting the following:
You cannot use the "RANGES" statement within classes. Instead, use the "DATA"
statement with the type "TYPE/LIKE RANGE OF" . . . . . . . . .
This is for the following data declaration:
RANGES: I_WERKS FOR EBAN-WERKS, "PLANT RANGE
I_VTWEG FOR I_TVTW-VTWEG,
I_VTWEG2 FOR I_TVTW-VTWEG,
I_VKORG FOR I_TVKO-VKORG,
I_AUART FOR I_TVAK-AUART.
What do I change and then how do i populate them?
Thanks,
John
Message was edited by:
John DamionWe dont use tables with header lines any more.
Declare a work area and use it transfer the data.
e.g.
types: types_ZDAILY_MVMT TYPE standard table of TABLE OF ZDAILY_MVMT.
data: I_ZDAILY_MVMT TYPE type_ZDAILY_MVMT,
wa_zdaily type zdaily_mvmt.
Now use this work area to move data into the table.
Regards,
Amit
Reward all helpful replies. -
I am running Photoshop elements 5.0 on Windows Vista. After downloading some pics that froze the download in the middle, I now get an error message when I try to open the organizer. Message is as follows:
Microsoft Visual C++ Runtime Library
The application has requested Runtime to termiinate it in an unusual way.
Can anyone help me with this problem.Have you applied the 5.0.2 patch. That may help.
http://www.adobe.com/support/downloads/detail.jsp?ftpID=3569
-
Novice (Ok Rookie) need help with error message
Hello all, I hope that you can help. I am getting this error
message when trying to submit registration information to the
database that I have created.
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] You cannot add or
change a record because a related record is required in table
'UserTypes'.
The error occurred in
C:\CFusionMX7\wwwroot\Development\signup.cfm: line 67
65 : <cfelse>
66 : NULL
67 : </cfif>
68 : , 0
69 : , 1
SQL INSERT INTO C:\CFusionMX7\wwwroot\database\wwf2.Users
(UserName, Password, FirstName, LastName, EmailAddress, Address,
City, "State", ZipCode, "Admin", Allowed, UserTypeId) VALUES (
(param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param
6) , (param 7) , (param 8) , (param 9) , 0 , 1 , 3 )
DATASOURCE WWF2
VENDORERRORCODE -1613
SQLSTATE 23000
Here is the code for that page
Any help would be much appreciated. Thank you all so much.
Damienquote:
Originally posted by:
DRufus
When I created the form, I used dreamweavers record insertion
wizard. could this be the issue. I'm sorry if I am not
understanding your solution.
Usage of <cfselect> is explained in the cfml reference
manual. If you don't have one, the internet does. The quickest way
to find it is to google the name of the tag, complete with angle
brackets.
I can't comment on dreamweaver's wizards because I never use
them.
Maybe you are looking for
-
See below
-
[SOLVED] GIMP is unable to save an PNG
Hello, when I try to save an PNG within GIMP I get the following message: Saving '/home/alex/test.png' failed: Error while saving '/home/alex/test.png'. Could not save image. This is my commandline output: libpng error: known incorrect sRGB profile (
-
Profiling application but component does not appear in Live Objects
I have built an application using Flash Builder 4.6 and Flex SDK 4.6, which consists of many custom-built components, some of which are vast and contain lots of code. When I run the application, one of the components which loads using PopUpManager is
-
Why am I recently getting garbled text when I try to download pdf's on my mac?
-
How to down low the Youtube for free
Try to find out to down low on the apps store the Youtube and i can not find even so, found a similar app but i have to purchase. I knew on Mac and would like to learn Thank you