How can I change font in the FileWriter???

Hello!
I just want to make a test program. This program make a text-file. This file have a the fallowing text: Hello!
I want to save the text with following font: Courier, 12pt, Bold.
How I can do this?
This is the code:
String text="Hello!";
try{
     FileWriter fw=new FileWriter("wtest.txt");
     fw.write(text);
     fw.close();
     System.out.println("OK!");
}catch(Exception e){
     e.printStackTrace();
Thanks for your help!

Text files have no concept of font. They contain (generally) 8-bit characters represented in ASCII.
If you want to store font information, you need to coose a format that supports this like html or pdf.

Similar Messages

  • How can I change font size in iCal 3.0.8?

    How can I change font size in iCal 3.0.8?

    Julian,
    There is no user option to change the font size in iCal.
    For other posts regarding this topic, read some of the links in "More Like This." box just to the right of your first post in this thread.

  • I have two iPhones and an iPad under same Apple ID. How can I change one of the iPhones to a separate id?

    I have 2 iPhones & an iPad under 1 Apple ID. How can I change 1 of the iPhones to a separate account?

    Sign out of the Apple ID on the device in question, making sure to disable the Find My iDevice feature.
    Sign in with the new Apple ID.
    If the intent is to sell the device, simply restore as new after disabling the Find My iDevice and signing out.

  • HT204053 I bought the iPhone 5 today.  I have 2 apple IDs.  I entered the wrong one when I set up the phone.  How can I change it to the other ID?

    I bought the iPhone 5 today.  I have 2 apple IDs and I entered the wrong one when I set up the phone.  How can I change it to the other one?

    Start Over...
    ERASE / Clear All Data
    See  Erase your device  Here  >  http://support.apple.com/kb/HT4137
    Go to Settings > General > Reset > Erase all content and settings

  • I adobe acrobat 7.0 professional. When I open or save a PDF it reverts to Adobe Reader XI. How can I change that to the pro as it has far more editing options.

    I adobe acrobat 7.0 professional. When I open or save a PDF it reverts to Adobe Reader XI. How can I change that to the pro as it has far more editing options.

    You may want to keep Reader. You may want to select Acrobat as your default, but be able to click on a PDF (or PDF link) to open in Reader when needed. There are likely some PDFs that will not open correctly in AA 7 because of new features folks add. Just because it opens in Reader XI does not mean it is in the new format, but just that is the default opening you have. To tell the type of file, you have to open the PDF and check the properties (ctrl-D) and check Description>PDF version.

  • How do I change font in the whole document at the same time?

    How do I change font in the whole document at the same time?

    Menu > View > Show Styles Drawer
    Menu > Help > Pages User Guide
    Download and read page 27 on creating and using Styles, which is done largely by example ie you make the text what you want then save it as a Style to be applied wherever you want in the document from the Styles Drawer.
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=180&mforum=iworktips ntrick
    Peter

  • HT4847 my backup file is too big?  how can i change some of the items that are being backed up to decrease size?

    my backup file is too big?  how can i change some of the items that are being backed up to decrease size?

    In iPhoto, Select All the Photos you want to move... Then goto  > File > Export >
    Choose the settings as seen here
    Click Export and select your External Drive
    Best to create a Folder to put them in... and away you go...

  • How can I change Icons on the Bookmarks Toolbar?

    How can I change Icons on the Bookmarks Toolbar?

    There are two extensions that help you apply your choice of an image for any Bookmark, not just the BTB icons. Choose one extension based upon the features it has, <br />
    https://addons.mozilla.org/en-US/firefox/addon/7849/ <br />
    https://addons.mozilla.org/en-US/firefox/addon/3176/

  • How do I change font inside the Form's text fields

    I went through tutorials on lynda.com and succesfuly layed out my form.
    However I can not figure out how to make a change from a default Times Roman in the forms fields to a different typeface.
    I assigned object styles, followed by paragraph styles but nothing happens. I also can not change font color inside the text fields.
    Anyone knows how to change these attributes?

    There are literally hundreds and thousands of improvements or changes that could be made to InDesign.
    Your comments here won't get to the product manager who decides which of those to implement in the next version. This is a forum of users like you, but if you post at the link below and make a good case, you'll have a better chance of getting what you want:
    Adobe - Feature Request/Bug Report Form

  • How can I change dates to the UK format, DD/MM/YY, in Mac Numbers?

    How can I change dates in Mac Numbers to the UK format of DD/MM/YY? When I correct them individually they automatically return to the US format.

    Open System Preferences, then click the "Languages & Region" pane in the first row.
    Change the Region from "United States" to "United Kingdom"

  • HT4528 I had to recently change my email address.  When I go to download an app the email is still the old one.  How can I change it on the phone.

    I had to recently change my email address.  Everything is fine except for when I want to download an app, my old email still shows up.  How can I change and/or update the new itune email address on my phone?

    All apps, all paid and free apps include DRM protection which is tied to the iTunes account that was used to download the apps. You can't transfer apps downloaded with one account to another account or merge accounts.

  • HT1473 i have itunes on 2 computers with the same email account. how can I change 1 of the computer email accounts?

    I have 2 computers that sign in to itunes on the same account email. How can I change 1 of them without changing the other account?

    We have had no issues with the update, nor has anyone we know. Most people never have an issue of any kind.
    MMS is working fine for me and everyone I know.
    Iphone will sync itunes content with ONE computer at a time.

  • I am trying to have my iPad sync on my wifi but the name in my sync now is different than my wi fi name how can I change it on the iPad?

    Need help sync for iPad. in the General on my iPad it is looking for one name but on my Wi-Fi under the WiFi is different how can I change it to be the same so I can sync the I pad via WiFi?

    When you go to Settings>General>WiFi Sync - you should see the name of your computer. that is what should up in there is WiFi syncing has been setup correctly in iTunes.

  • How can i change font used by the java plugin?

    im running j2se 1.4.0 on win2k, and the java plugin is using a font that is not readable because sized way too small (also, the font is not a 'standard' font).
    the font is also applied do class loading or exception messages in java applets (in IE5.5, but i don't think that this is browser-related).
    is there a possibility to change to font (or the font size)?

    thanks for the tip, but this problem seems not to be tightened to the font.properties file:
    the wrong font is only used with the j2sdk1.4.0 plugin, not with that from j2re1.4.0 (actually, i had installed jre first, and afterwards j2sdk without removing j2re before). changing the plugin used back to j2re made the java console display the correct font (though the font.properties files were identically in both cases).

  • How can I change font name on Mac to be compatible with PC?

    Hi,
    My font names on my new Macbook does not match with PC and my previous Macbook. For example, "CordiaUPC" on PC and my old Macbook is called "UPC-Cordia" on my new Macbook. So all my saved documents where font was set as "CordiaUPC" is now unreadable, and I have to reset the font to "UPC-Cordia" when I open it. The issue is, I am a writer and I have to submit my writing to people who use PC's. Then when they open my document, it appears like it cannot be read. It is super inconvenient.
    Does anyone know how I can change the name of the fonts in the Font Book? I tried selecting like when I rename the files but it didn't work.
    Thanks.

    Are you using the same font file on Your Mac as the PC users are? Meaning, that the font file was copied/installed from a PC to your Mac's /Library/Fonts or ~/Library/Fonts folder or did you install the Mac version of the font on your Mac. You can try flushing the font cache for your Mac with a utility like Cocktail or Onyx to see if that resolves the naming problem.

Maybe you are looking for

  • One iCloud, two iOS devices, one mac: How do I have different settings?

    Hi all, I have a MBP and iPhone 5 and recently just got iPad mini as a gift. I have my iPhone sync thru iCloud with my MBP. Now I would like to setup my iPad with the same iCloud so I can have contacts, calendar, reminder, and photo stream BUT, I don

  • Browser Plug in

    Greetings, I apologize if I'm posting in the wrong forum. Whenever I visit the following page: http://ca.blackberry.com/apps-software/devices/ I get a message saying: "This webpage wants to run the following add-on: 'BlackBerry WebSL Browser Plug-In'

  • Bizcard customization of ESS for buttons and fields

    Hi All, I have some queries on ESS Bizcard Customization of Family infotype: 1. How to hide delete buttons for one subtype when it should not be hidden for the others. 2. How to add extra fields for one subtpe while we do not need the extra fields fo

  • I'm having trouble with the guitar tuner in Garageband!

    I'm having trouble with the guitar tuner in the new Garageband ..locked on C, no response! I've read that opening and locking a couple of times will unfreeze it but that's not working for me. Any suggestions?

  • Time Capsule not working after a restore

    I recently had to restore from my TM/TC backup after a standard software update made it so I could no longer log into my account. Now, my TC is not working properly. I can still access all of my past updates on mu TC, but it is not working for making