Page 2 of 2 FirstFirst 12
Results 21 to 30 of 30
  1. #21
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,463
    Rep Power
    25

  2. #22
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

    Default

    You can choose the font in a JTextArea, but it will be the same font throughout the Area.

    You can allow the user to change the font at run time, but again it will be the same font for the whole JTextArea.

    I think a JTextPane will be too advanced for a new user. Its possible to use, but if its completely new to you and you only have until wednesday Id stay away from it for now.

    berkeleybross

  3. #23
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by EBBOOO View Post
    what if i want to choose the font what should i use???
    sorry too many questions :S
    You're getting a bit ahead of yourself here. If it were my project, I'd worry much more about getting the overall logic correct and would worry about the font and all dress-up last. I will second the recommendation to stick with the simpler JTextArea and forget using a JTextPane for now.

  4. #24
    EBBOOO is offline Member
    Join Date
    Jun 2010
    Posts
    42
    Rep Power
    0

    Default

    i faced a problem,
    there is a method call "save",i don't know how to use it

  5. #25
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

    Default

    I think you need to explain a bit more..
    Where is the 'save' method? In what object?

    Or are you asking how should you save the text?

    berkeleybross

  6. #26
    EBBOOO is offline Member
    Join Date
    Jun 2010
    Posts
    42
    Rep Power
    0

    Default

    yes how can i save the text???

  7. #27
    EBBOOO is offline Member
    Join Date
    Jun 2010
    Posts
    42
    Rep Power
    0

    Default

    and can i save it as not pad file??? .txt???

  8. #28
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,463
    Rep Power
    25

    Default

    Yes you could save the text as a .txt file.

    What is a "pad file"?

  9. #29
    EBBOOO is offline Member
    Join Date
    Jun 2010
    Posts
    42
    Rep Power
    0

    Default

    what i meant is NotePad

    so how can i save the text as .txt???
    i found a method call "saveFile" and a class name fileManager but i didn't know how to use them :(
    could you please help me???

  10. #30
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,463
    Rep Power
    25

    Default

    I don't know of a java class named fileManager. All proper java classes have names starting with uppercase letters.

    Normally when you want to use a class, you read the API doc:Java Platform SE 6

    The syntax for all the classes and methods are defined there.

    If you need more help, look at the Java Tutorial: The Java™ Tutorials

    Look in the sections regarding reading and writing files.

    There are lots of codes samples on this forum. Use Search to find them.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Need advise for choosing book
    By Teodor__b in forum New To Java
    Replies: 2
    Last Post: 02-19-2010, 01:13 PM
  2. Some advise please!!!
    By PVL268 in forum New To Java
    Replies: 2
    Last Post: 04-17-2009, 09:36 AM
  3. need advise...
    By chkm8 in forum AWT / Swing
    Replies: 4
    Last Post: 02-10-2009, 05:57 AM
  4. advise on designing an ejb application
    By bobD in forum New To Java
    Replies: 0
    Last Post: 09-03-2008, 09:04 AM
  5. give me a advise
    By sireesha in forum New To Java
    Replies: 3
    Last Post: 12-11-2007, 01:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •