Description: CMU Java课程设计,本人花了一周完成的
非常完善的功能,学习CMU的初学者不可错过-CMU Java curriculum design, I spent a week to complete the very well-established function, learning CMU beginner not to be missed Platform: |
Size: 69632 |
Author:张思 |
Hits:
Description: ssd3练习8的答案,大家快下吧,没有问题的,放心用-Eight practice ssd3 answer to everyone soon, are you, no problem, rest assured that with Platform: |
Size: 109568 |
Author:王运生 |
Hits:
Description: This Work graded 100
class SaveSalesListener implements ActionListener {
/**
* Saves the sales informations in a file.
*
* @param event the event object.
*/
public void actionPerformed(ActionEvent event) {
if (sales.getNumberOfOrders() == 0) {
statusTextArea.setText("No order has been sold.")
}
else {
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY)
int result = fileChooser.showSaveDialog(null)
if (result != JFileChooser.APPROVE_OPTION) {
statusTextArea.setText("The sales information has " +
"not been saved.")
}
else {
File file = fileChooser.getSelectedFile()
try {
PrintWriter output = new PrintWriter(
new FileWriter(file))
output.print(salesFormatter.formatSales(sales))
output.close()
}
catch (IOException ioe) {
statusTextArea.setText("Error: Problem with I/O.") -This Work graded 100
class SaveSalesListener implements ActionListener {
/**
* Saves the sales informations in a file.
*
* @param event the event object.
*/
public void actionPerformed(ActionEvent event) {
if (sales.getNumberOfOrders() == 0) {
statusTextArea.setText("No order has been sold.")
}
else {
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY)
int result = fileChooser.showSaveDialog(null)
if (result != JFileChooser.APPROVE_OPTION) {
statusTextArea.setText("The sales information has " +
"not been saved.")
}
else {
File file = fileChooser.getSelectedFile()
try {
PrintWriter output = new PrintWriter(
new FileWriter(file))
output.print(salesFormatter.formatSales(sales))
output.close()
}
catch (IOException ioe) {
statusTextArea.setText("Error: Problem with I/O.") Platform: |
Size: 4096 |
Author:EA |
Hits: