Board index » off-topic » An Error In Tutorial: Building A Java Text Editor

An Error In Tutorial: Building A Java Text Editor


2005-02-05 05:41:38 AM
off-topic2
I'm following the above said Tutorial included in the Borland JBuilder 2005 (Enterprise Trial). It works OK until step 9, but at step 10, when I use the following code I get an error at the shown arrow position. Can anybody help??? As I'm new to this JBuilder & don't know what to do about it? I tried few tricks but then I get more errors. I'm really disappointed.
I'll appreciate the help to solve it.
// Save current file; handle not yet having a filename; report to statusBar.
boolean saveFile() <----- (Here I get an error that says";"
expected)
{
// Handle the case where we don't have a file name yet.
if (currFileName == null) {
return saveAsFile();
}
try {
// Open a file of the current name.
File file = new File (currFileName);
// Create an output writer that will write to that file.
// FileWriter handles international characters encoding conversions.
FileWriter out = new FileWriter(file);
String text = jTextArea1.getText();
out.write(text);
out.close();
this.dirty = false;
// Display the name of the saved directory+file in the statusBar.
statusBar.setText("Saved to " + currFileName);
return true;
}
catch (IOException e) {
statusBar.setText("Error saving "+ currFileName);
}
return false;
}
Thanks In Advance
 
 

Re:An Error In Tutorial: Building A Java Text Editor

This newsgroup is dedicated to the CodeWright product. You will probably
get a better response to your question in another newsgroup.
--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
"Bharti Kumar" < XXXX@XXXXX.COM >wrote in message
Quote

< SNIP>

 

Re:An Error In Tutorial: Building A Java Text Editor

Thanx for the advice, but I would like to know that which newsgroup will be helpful??
"Thom Little" < XXXX@XXXXX.COM >wrote:
Quote
This newsgroup is dedicated to the CodeWright product. You will probably
get a better response to your question in another newsgroup.

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--

"Bharti Kumar" < XXXX@XXXXX.COM >wrote in message
news:4203ec12$ XXXX@XXXXX.COM ...
>
>< SNIP>
>


 

{smallsort}

Re:An Error In Tutorial: Building A Java Text Editor

On 6 Feb 2005 19:54:36 -0800, Bharti Kumar wrote:
Quote

Thanx for the advice, but I would like to know that which newsgroup will be helpful??

Here's the main Borland newsgroup web page
info.borland.com/newsgroups/
Here's the list of jbuilder groups
info.borland.com/newsgroups/ng_jbuilder.html
The java language group is probably the one you want.
newsgroups.borland.com/cgi-bin/dnewsweb&utag=
Graeme
 

Re:An Error In Tutorial: Building A Java Text Editor

Thanx Graeme
I'll try these newsgroup to solve my problem
Bharti
Graeme Prentice < XXXX@XXXXX.COM >wrote:
Quote
On 6 Feb 2005 19:54:36 -0800, Bharti Kumar wrote:

>
>Thanx for the advice, but I would like to know that which newsgroup will be helpful??
>

Here's the main Borland newsgroup web page
info.borland.com/newsgroups/

Here's the list of jbuilder groups
info.borland.com/newsgroups/ng_jbuilder.html

The java language group is probably the one you want.
news://newsgroups.borland.com/borland.public.jbuilder.java.language

newsgroups.borland.com/cgi-bin/dnewsweb&utag=

Graeme