Set line length

I belong to a travel discussion group and they request that all e-mails are received in plain text and with a 60 character per line limit. How do I set the line length to a maximum of 60 characters?

Dear Diana,
This seems really antiquated. I can't think of any discussion groups I belong to that ask you to set the line length of my contributions.
Whatever. Since no one has replied to you, I offer a completely clunky way of doing this. I can't see where Mail has this capability/preference setting.
Anyway, go to barebones software's web site and download the free application TextWrangler. It's just a text editing program. BBedit will do the job too but I'm assuming you don't have that.
In TextWrangler, set up a document with a 60 character width (open a new document, go to Edit-->Text Options... and check "Soft Wrap Text" and under the "to character width" option put "60" in the box).
You can save this document with a silly name so you don't have to create it every time you want to format a mail.
Next, either compose a mail in the document or paste your text into it.
It will be 60 characters wide at this point, but the breaks will be "soft"; you need to go to Text-->Add Line Breaks. Now you can copy your text and paste it into an email.
This sounds like a lot of steps but it is easy. You could probably Applescript it.
Anyway, there is probably a much better answer to your question, but I didn't want to leave you hanging longer. Once your problem leaves the front page it gets less and less attention.
Also, note that in Mail preferences you can find the option to compose and send mails as plain text rather than rich text.
G4 933 mhz Quicksilver   Mac OS X (10.4.8)   Wacom Intuos 2 tablet; Epson 2400 Photo; HP Deskjet 6840; LaCie 80gb D2 FWDV

Similar Messages

  • Setting specific length for a line

    I'm looking for a way to enter an exact length for a line. Also, exact dimensions for a rectangle.
    I'm assuming there's a 'Properties' window or something that has the shape's properties, but I'm not seeing anything. I've searched the help site, but not seeing anything there either.
    Any assistance would be greatly appreciated.
    doug

    Look for the little downturned arrow in the tool options bar for more options for the different shape tools.
    I don't know that you can set a fixed length for the Line Tool, but could use the rectangle tool for a fixed line length.

  • Line length limit

    Hi,
    I'm having a problem with a large group (about 2500 members). I first thougt this is a Directory Server Problem, but the Server Log is identical for small and large groups and does not show any problems. Additionally even if i put the group (with all members) into /etc/group, I still cant see the group!
    When using vi to edit /etc/group it sais: line too long.
    I figured out this to be a problem with the maximum line length defined in /usr/include/limits.h (LINE_MAX). The value set here is 2048, but my line is about 13K.
    Could my explanation be correct? If so, how can I change the line limit to a bigger value?
    thanks,
    David

    Hi Martin,
    I might not have explaned enough the issue. I dont want to edit the file with vi, this was just what I experienced on the side. My real problem is, that Solaris doesnt know this group, even though it is in /etc/group!
    id just shows the gid number, but not the group name:
    bash-2.05$ id
    uid=21345(ab123) gid=10000
    bash-2.05$ groups
    10000
    getent doesnt know the group too:
    bash-2.05$ getent group gp_everyone
    [No output]
    And this is constrained by the Solaris system as I think. Because of the limited line length. Do you know how to reconfigure Solaris 9 and 10 for a longer line length?
    big thanks
    --David                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Max line and Max line length restriction in FTP

    Hi all,
    We are using a FTP adapter in our BPEL service to read the input files from a FTP server location.
    Our service fails when the input file has more than 99 lines or if the length of the line exceeds 9 characters.
    i.e:
    Max allowed characters in a line (Max line length) is 9
    Max allowed lines in the file is 99
    If the above limit is exceeded we get the error saying that the FTP authentication failed or permission denied error.
    Do we need to set the Max line length and Max line parameters anywhere in weblogic console or in JCA properties.
    Kindly help us resolve the issue. Thanks in advance.
    Regards,
    Balaji R

    We do not have any schema for the file data since we are reading the file content as attachment.

  • Arrowhead adds to line length?

    Ai 10.0.3
    OSX 10.3.4
    I am trying to dimension some signage for a set of architectural plans. Previously I had always used 'Filter > Stylize > Add Arrowheads...' to do this. Recently I've found that arrowheads are also available under 'Effect > Stylize > Add Arrowheads...'. I really enjoy all the live effects and the ability to edit them after the fact as well as preview when first creating them. I particularly enjoy the live arrows from the standpoint that when I move the line endpoint, the arrowhead automatically reorients to the correct angle.
    That's all good, but on to the problem. Both types of arrowheads do NOT fall within the original line endpoints. It boggles my mind why someone would design arrowheads to behave this way? It obviously makes dimensioning very difficult and time consuming. Instead of snapping to the endpoints of some artwork or using the transform palette to numerically enter a distance, compensations have to constantly be made for the length of the arrow.
    I've always had to do this with the 'filter arrows'. It was a pain, but since the arrow was actually artwork, I could get info about it concerning how much length it added. The 'live arrows' do not even provide this level of workaround because being 'live', they are not selectable as artwork without expanding their appearance, which removes their 'live' characteristics.
    Question? My question is this - does anyone know of a method whereby the arrowhead (live or filter) does NOT add to the overall line length? Has anyone come across another, more efficient workaround to what I've been trying.
    I know of one fairly elegant solution in plugin form - HotDoor CadTools. I would love to be able to use that for a number of reasons, but have not been able to get management approval for purchase. So in the meantime, any help would be greatly appreciated.
    Thanks.

    > How is it possible to add your own symbol to the start and end of a path...
    I have long argued that anything you define as a Symbol (in the Symbols Palette) should be made available for application as Arrowheads. Meanwhile, try this to get a basic principle down:
    1. Rectangle Tool: ClickShiftDrag to draw a small square.
    2. DoubleClick the rotate tool to rotate the square 45 degrees.
    3. Press the minus key to get the Remove Point Tool. Click the leftmost point to delete it. You now have a right-pointing triangle. Give it a fill of none, solid stroke.
    4. Drag the triangle and drop it into the Brushes Palette. In the resulting dialog, choose Pattern Brush.
    5. Drag the new Pattern Brush from the Brushes Palette onto the page.
    6. Note that the bounding box of the triangle is rectangular. This is a Group which contains two objects: The triangle you drew, and an unfilled, unstroked rectangle, which is under the triangle in the stacking order. This invisible rectangle is what determines the "tile size" of the artwork when it is used in the Brush.
    7. With the DirectSelect Pointer, press Alt and drag across where you know there is an edge of the invisible rectangle, without dragging across the triangle. This "directSelects" the whole rectangular path.
    8. Transform Palette: Click one of the right points of the 9-point proxy icon. Then set the Width to some small value, like 1 pt. (but not to zero).
    9. Deselect. Then normal-select the whole group. Press Alt. Drag and drop the group onto the End Tile of your Pattern Brush.
    10. The Group is still on the page. DoubleClick the Rotate tool and rotate it 180 degrees. AltDrag and drop this onto the Start Tile of your Pattern Brush.
    11. Rectangle Tool: Draw a small square. Fill of none. Stroke of none. AltDrag and drop this onto the Side Tile of your Pattern Brush (the tile where the very first triangle originally appeared when you first defined the Brush. This replaces the Side Tile of the Brush with, effectively, nothing.
    Now try it out:
    12. Line Tool: Draw a line. Apply the Brush. Note that the "arrowheads" are positioned very near the ends of the path, instead of protruding out beyond them as do AI's normal Arrowheads.
    13. DirectSelect one endpoint of the path. Drag it nearer and nearer the other end. Note that even when it gets very near, the triangles retain their shape. Drag even closer until the two triangles actually overlap. Still they retain their proportion (within a very small variance--it's a function of how narrow you made the invisible box. If, however, you had given the width of the invisible box a value of zero, the end tiles would distort when the path is very short.)
    14. Now draw another line or curvey path. Apply the Brush. Expand Appearance. Ungroup. Note that the invisible box you used to define the Side Tiles did not result in a bunch of invisible boxes along the length of the path. (This is a good thing.)
    15. So now you have custom arrowheads. But the length of the path is invisible. Appearance Palette: Add New Stroke. Make the new stroke whatever color, width you want. Drag the whole path to the Graphic Styles Palette to define a Style which you can apply to other paths with one click.
    All this convoluted bother is
    almost like a custom arrowheads feature common in som many other drawing programs. But it is not perfect. If the path is tightly curved at either of its endpoints, the End and Start Tiles artwork will still deform in an attempt to bend around the curve. In most cases, you can circumvent this by placing a short straight segment beyond the curvepoint.
    Again: Illustrator need these improvements:
    The existing Arrowheads Effect dialog needs to be changed to simply include popup menus showing the currently defined Symbols, and a little preview frame that lets you position the Symbol in relation to the endpoint of the path.
    The Brush Options dialog for Pattern Brushes needs to be given a checkbox which disallows distortion of end tiles.
    JET

  • Where do I enter the number for Line length or measure if given 16/19x32?

    Where do I enter the number for Line length or measure if set in Adobe Caslon Pro 16/19x32?  I know 16 is point size, 19 is leading but where do I enter 32?
    Thanks
    James P

    The key is in your second image, though both are too small. Let's use this one, courtesy of Amazon's preview of the book:
    All that "spec is saying is that the  frame the text is in should allow for lines of text equaling 20 picas. But the 20 picas relates to the column, not any paragraph style per se.
    Now, if you received mark-up that is for a portion of text, say a poem set into a body of text in a wider column, then the 20 picas would relate to the paragraph style for the poem itself.
    Make sense?
    Take care, Mike

  • File adapter-How to set line break in text file-split record into two lines

    Dear Guru's,
    I have to solve following problem with XML (with mulitiple records) to TEXT file scenario using file adapter. I have to output for ever ONE data record in XML always two identical lines in text file. Second line should have a little bit different mapping in few fields like date,... So I did duplicate fileds in my output structure in mapping and need to know how to set line break in the middle and see half of structure in first line and next structure half in second line
    My output structure in mapping is:
    CASHFLOW
    - INTERFACE
    - GESELLSCHAFT
    - ANWENDUNG
    - PRODUKT
    - VERTRAG
    - BETRAG
    - WAEHRUNG
    - DIRECTION
    - BEWEGUNGSTYP
    - FAELLIGKEIT
    - ZINSFESTSTELLUNG
    - ZAHLUNGSTAG
    - RENDITE
    - INTERFACE2
    - GESELLSCHAFT2
    - ANWENDUNG2
    - PRODUKT2
    - VERTRAG2
    - BETRAG2
    - WAEHRUNG2
    - DIRECTION2
    - BEWEGUNGSTYP2
    - FAELLIGKEIT2
    - ZINSFESTSTELLUNG2
    - ZAHLUNGSTAG2
    - RENDITE2
    Question is how can I set on receiving file adapter in Content Conversion Parameters that fields from first structure half INTERFACE...RENDITE should be outputed in one line and fields from second half of structure INTERFACE2...RENDITE2 should start on second line in final text file.
    I'm getting at the moment one line only and I need to know how can set line break so that second line starting with INTERFACE2(CA)...RENDITE2 will start in new line.
    CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000",CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
    This should be final output:
    CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000"
    CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
    My file adapter settings:
    RecordsetStructure=CASHFLOW
    CASHFLOW.fieldNames=INTERFACE,GESELLSCHAFT,ANWENDUNG,PRODUKT,VERTRAG,BETRAG,WAEHRUNG,DIRECTION,BEWEGUNGSTYP,FAELLIGKEIT,ZINSFESTSTELLUNG,ZAHLUNGSTAG,RENDITE
    CASHFLOW.fieldSeparator=,
    CASHFLOW.endSeparator='nl'
    CASHFLOW.fieldNames=INTERFACE2,GESELLSCHAFT2,ANWENDUNG2,PRODUKT2,VERTRAG2,BETRAG2,WAEHRUNG2,DIRECTION2,BEWEGUNGSTYP2,FAELLIGKEIT2,ZINSFESTSTELLUNG2,ZAHLUNGSTAG2,RENDITE2
    CASHFLOW.fieldSeparator=,
    It wont help if I add two identical structures in mapping because in output i would see for multiple entries section with first lines only and after that section with second lines only. And CASHFLOW is one part of more complex mapping ...
    (This is final output structure RecordsetStructure=HEADER,CASHFLOW,CONDITION,REFERENCE,CONTRACT - more sections with different data and all these should have duplicate lines at the end)
    Thanks a lot for any help
    Cheers
    Marian
    Edited by: Marian  Luscon on Jul 14, 2009 11:44 AM

    Hi Ivan,
    right, I did test just for sure.
    Putting constant 'nl' into field CASHFLOW-INTERFACE1 didnt help - still getting one line instead two lines.
    CA ,"0100" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,2 ,12 ,2009-01-28 ,2009-01-27 ,2009-01-28 ,"0.0000000" ,'nl' ,"GTP1" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,1 ,10 ,2009-01-27 ,2009-01-27 ,2009-01-27 ,"0.0000000"
    So there is still question. Is there any way (mapping,...) how to output always 2 lines in text file for one record in XML. It always does 1 record in mapping structure = 1 line but we need 2 lines ...
    Example:
    Input: 4 records in XML
    Output: 8 lines in final text file ...
    Thanks to you all guys
    Marian

  • How can i plot a histogram with using the results of Line Length

    PLS HELP.How can i prepare a histogram with using the results of line length code(It is somewhere in the middle).
    This is a final exam take-home question. I would appreciate if you can help?
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import java.text.*;
    import java.io.File;
    public class WordAnalyser extends JFrame implements ActionListener
    private JMenuItem jmiAc, jmiSil, jmiCikis, jmiAnaliz, jmiHakkinda, jmiKullanim;
    private JTextArea jta1, jta2;
    private JFileChooser jFileChooser = new JFileChooser();
    File hafizada;
    File aktarilan = new File("Sonuc.txt");
    // Main method
    public static void main(String[] args)
    WordAnalyser frame = new WordAnalyser(); /* Ana ekran olusturulur */
    frame.setSize(400, 300); /* Degerleri belirlenir */
    frame.setVisible(true); /* Gorunebilirligi ayarlanir */
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public WordAnalyser()
    setTitle("Serkan Ozgen Dosya Inceleme Programina Hos Geldiniz");
    JMenuBar mb = new JMenuBar();
    setJMenuBar(mb);
    JMenu fileMenu = new JMenu("Dosya");
    fileMenu.setMnemonic('F');
    mb.add(fileMenu);
    JMenu helpMenu = new JMenu("Degerlendirme");
    helpMenu.setMnemonic('H');
    mb.add(helpMenu);
    JMenu kullanimMenu = new JMenu("Kullanim Kilavuzu");
    mb.add(kullanimMenu);     
    fileMenu.add(jmiAc = new JMenuItem("Ac", 'A'));
    fileMenu.add(jmiSil = new JMenuItem("Sil", 'S'));
    fileMenu.add(jmiCikis = new JMenuItem("Cikis", 'C'));
    helpMenu.add(jmiAnaliz = new JMenuItem("Analiz", 'D'));
    helpMenu.add(jmiHakkinda = new JMenuItem("Hakkinda", 'H'));
    kullanimMenu.add(jmiKullanim = new JMenuItem("Kullanim"));     
    getContentPane().add(new JScrollPane(jta1 = new JTextArea()), BorderLayout.CENTER);
    getContentPane().add(jta2 = new JTextArea(), BorderLayout.SOUTH);
    jmiAc.addActionListener(this);
    jmiSil.addActionListener(this);
    jmiCikis.addActionListener(this);
    jmiAnaliz.addActionListener(this);
    jmiHakkinda.addActionListener(this);
    jmiKullanim.addActionListener(this);
    public void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JMenuItem)
    if ("Ac".equals(actionCommand))
    Ac();
    else if ("Sil".equals(actionCommand))
    Sil();
    else if ("Cikis".equals(actionCommand))
    System.exit(0);
    else if ("Analiz".equals(actionCommand))
    sayim();
    else if ("Hakkinda".equals(actionCommand))
    JOptionPane.showMessageDialog(this,
    "!!!! Bu program text analizi gerceklestirir. Her hakki saklidir SERKAN OZGEN!!!!",
    "Bu program hakkinda",
    JOptionPane.INFORMATION_MESSAGE);
    else if ("Kullanim".equals(actionCommand))
         JOptionPane.showMessageDialog(this,
         " Ilk once dosya menusunden Ac i tiklayarak analiz etmek istediginiz Dosyayi seciniz (Lutfen uzantisi *.txt \nveya *.log olsun). Daha sonra Degerlendirme menusunden analizi tiklarsaniz dosyanizda kac adet rakam, harf, \ncumle ve kelime oldugunu gorebilirsiniz. Simdiden kolay gelsin",
         "Programin kullanim detaylari",
         JOptionPane.INFORMATION_MESSAGE);
    private void Ac()
    if (jFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
    hafizada = jFileChooser.getSelectedFile();
    Ac(hafizada);
    // Acilan Dosyayi ana ekranda gostermeye yariyan bir method
    private void Ac(File file)
    try
    // Acilan dosyayi okuma ve ana ekranda gosterme
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    jta1.append(new String(b, 0, b.length));
    in.close();
    catch (IOException ex)
    // Temizle tusunun hangi ekranlara etki edecegini secme
    private void Sil()
    jta1.setText("");
    jta2.setText("");
    private void sayim()
    int buff;
    int sayac = 0;
    int Cumleler = 0;
    int Kelimeler = 0;
    int Karakterler = 0;
    int Satirlar = 0;
    int Rakamlar = 0;     
    boolean start = true;
    int linenum = 0;     
    try
    FileInputStream instream = new FileInputStream(hafizada);
    FileOutputStream outstream = new FileOutputStream(aktarilan);
         BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(hafizada)));
    PrintStream out = new PrintStream(outstream);
         out.println("---Kelime Avcisinin Sonuclari---");
         String line = infile.readLine();
         while (line != null){
         int len = line.length();
         linenum++;
         line = infile.readLine();
         out.println("Line Length :"     + linenum + "\t" +len);
    while ((buff=instream.read()) != -1)
    switch((char)buff)
    case '?': case '.': case '!': /* Eger "?", "." veya "!" gorurse program cumleleri ve kelimeleri arttirir*/
    if (start == false)
    Cumleler++;
    Kelimeler++;
    start = true;
    break;
    case ' ': case '\t': case ',': case ';': case ':': case'\"': case'\'': /* Eger /t,;:\ ve \" bu isarteleri goruruse program kelimeleri arttirir */
    if (start == false)
    Kelimeler++;
    start = true;
    break;
              case 'n': case '\n': /* Eger \n gorurse satirlari arttirir */
              if (start == false)
                   Satirlar++;
                   Kelimeler++;
                   start = true;
              break;
    default:
    if (((char)buff >= 'a' && (char)buff<='z')|| /*a-z, A-Z veya - degerlerini gorurse karakterler arttirilir */
    ((char)buff >= 'A' && (char)buff<='Z')||
    ((char)buff == '-'))
    Karakterler++;
    if ((Kelimeler % 50) == 49)
    if (start == true)
                   out.println();     
    out.print((Kelimeler+1) + " ");
    out.print((char)buff);
    start = false;
              if ((char)buff >='0' && (char)buff <='9') {  /* 0-9 gorurse rakamlari arttiri */
                   Rakamlar++; }
    }// switch
         }//while
    instream.close();
    out.println();
    out.println();
    out.println("Karakter sayisi: " + Karakterler);
         out.println("Kelime sayisi: " + Kelimeler);
    out.println("Cumle sayisi: " + Cumleler);
         out.println("Satir sayisi: "+ Satirlar);
         out.println("Rakam sayisi: "+ Rakamlar);
    outstream.close();
    try
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(aktarilan));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    jta2.append(new String(b, 0, b.length));
    in.close();
    catch (IOException ex)
    catch (Exception e)
    System.out.println(e);
    }

    Why is it that you're not interested in IOExceptions?
    catch (IOException ex)
    } Empty catch blocks is a hallmark of foolish Java code. At least print out the stack trace.
    %

  • Xsd:integer - how to set maximum length

    Hi,
    In a structure, I have set some of fields as xsd:integer.  my scenario is file to proxy.  while generating the inbound proxy, for those elements which are xsd:integer, the data dictionary fields are authomatically set to INT4.  Whereas the actual field length is 15.  so when i test with the data the proxy fails as there is a mismatch is the length.  how do i overcome this problem.
    can i set the length of the field when the data type is xsd:integer so that while generating the proxy automatically this field length is taken. or otherwise can i change the data type in the dictionary table.
    kindly advise.
    Bala

    experts,
    can anyone suggest how to deal with this issue.
    thanks in advance. bala

  • Custom fields and line length in Address Book

    Hi everyone. Does anyone know how to alter the permitted line length of a label in Address Book? If I create a custom label the label will be truncated if it is too long. This does not seem necessary as there can be loads of blank space to the right of the card window. In other words the label will not resize dynamically to accommodate a long custom label. I have a feeling that you may be able to edit a .plist file in the Package to adjust the default number of characters the label can have, but I'm a bit nervous about poking about when I'm not too knowledgeable. Any ideas?

    In other words the label will not resize dynamically to accommodate a long custom label.
    Of course not. You've chosen a specific label style/size, so if it were to resize dynamically, that would cause text to print where there is no label stock.
    You cannot edit any file to change the number of characters per label; at best, you could creae your own label size and define the margins, but that's it.
    Mulder

  • How do I set the length of a podcast?

    How do I set the length of a podcast? I am using Garageband 3.0.2

    Drag the little purple left facing triangle at the top of the timeline to where you want the export to end.
    (Note, GB does impose a minimum length, but I dont' recall what that is at the moment)

  • Calculating line length in Java

    Hi all;
    I've been using LineBreakMeasurer & AttributedString to measure line lengths. However, I now need to take into account:
    Small Caps
    Scaling (making each character thinner/wider).
    Spacing (adding/subtracting space after each character).
    Hyphenation, where line breaks can occur at specific places within words.
    Is there a way to do this using Java? The two fundamental things I need to get is:
    How long is a passed in string.
    For a passed in string and length, how many characters of the string fits in that length.
    I can do this using LineBreakMeasurer & AttributedString and calling it character by character. But is there a better way?
    thanks - dave

    Hi, Have you had a look at the FontMetrics class? That might be an option.

  • How to set line width using CoreGraphics ?

    Hi guys.
    I trying draw line with 2 pixels width.
    How to set line width on CoreGraphics ?
    AFAIK, OpenGLES.framework has method like this :
    glLineWidth(2.0);
    Is it possible for CoreGraphics ?
    Thanks in advance.

    See CGContextSetLineWidth in the CGContextReference.
    You might also want to look over Painting a Path in the +Quartz 2D Programming Guide+.
    \- Ray

  • How can I set line wrap on a JButton??

    Hi...
    I am working on an application that required to have a long label on a button and I was wondering if anyone know how to set line wrap on a JButton. Any suggestion will be greatly appreciate.

    If it is not inconvenient for you to use mouse events instead of action events this procedure may be adequate.
    Invoke "createImage" on the JButton to obtain an "Image" object then use "getGraphics" on the image object to get "Graphics" object. Next call "getFontMetrics" on the "Graphics" object to obtain "FontMetrics". Now you can get the size of a String drawn from the "drawString" method of the "Graphics" object. This can be obtained in an int returned from "getHeight" method in "FontMetrics".
    You can obtain the center of the "Image" by using "getSize" method from JButton and dividing it by 2.
    You can get the width of characters by using "FontMetrics" "charsWidth" method. Now you can use the int returned from charsWidth and getHeight to align text in the JButton "Image" by using the "Dimension"
    object returned by the "getSize" method. Now invoke
    the "drawString" method for as many lines of text as you would like to display. After finished drawing strings you
    construct an ImageIcon with its one parameter being the "Image" object you have created and drawn on.
    Now you invoke the "setIcon" method of JButton to insert the ImageIcon as the image displayed on the JButton.
    At this point you have a JButton with all the text you want displayed on it, but with no event handling. So
    you are going to add a MouseListener to the JButton.
    In the MouseListener override the "mouseClicked" method
    inside the method obtain the MouseEvent's location through "getX" and "getY". Next invoke the JButton's
    "getLocation" method to obtain a "Point" object. Now invoke the "Point" objects "getX" and "getY" methods to return the int locations of the origin of the JButton.
    Now invoke the "getSize" method of the JButton to get
    a "Dimension" object containing the size of the JButton.
    Now you can use boolean operations to determine if the
    x, y coordinate that was obtained by the MouseEvent falls within the boundries of the JButton component.
    Something like this:
    public void mouseClicked(MouseEvent mouseEvent) {
    Point point=jbutton.getLocation();
    Dimension dimension=jbutton.getSize();
    int pX=point.getX();
    int pY=point.getY();
    int dW=dimension.width;
    int dH=dimension.height;
    int mX=mouseEvent.getX();
    int mY=mouseEvent.getY();
    if(mX>pX & mX<(pX+dW)) {
    if(mY>pY & mY<(pY+dH)) {
    //This means that the point does indeed fall within
    //the boundries of the JButton, so place the code
    //that would normally appear in actionPerformed
    //within this code block
    Good Luck.

  • URGENT:  vertical lines length in the Mainwindow in smartforms

    hI,
            In main window 4 vertical lines are there like.. below
    item | material no.er | mat.desc |  quantity |  total price
           |                      |                |              |
    Now the problem is:  these vertical lines entered into the next below window.. Now I want to reduce the length of these vertical lines.
      Please explain where can I reduce  to these vertical lines length.
    Thanks and Regards,
    Surya

    Hi,
    in the beginning of the report program:
    report  <program_name> line-size <give the length say eg:150>.
    <b>reward points if useful.</b>
    regards,
    Vinod Samuel.

Maybe you are looking for

  • Re install Adobe Photoshop CS2

    31/05/2013. The question is for someone with Photoshop CS2 on Windows 7. I presently had to reformat my hard drive to get rid of a bug that left me with a black screen. After all is reset started to ri install my old programs. One of them is Adobe Ph

  • Report to redetermine SNP Source of supply

    We configured Planned Order integration model to show up R/3 planned orders as SNP Planned orders in APO. However when the planners on R/3 side intervene the orders in terms of some of the fields, it passes on to APO as a planned order without source

  • Opening multiple document in single instance (window)

    Someone here mentioned this: "Acrobat 9 no longer supports opening multiple documents in the same window." This is disappointing.. does anyone know the workaround / hack? Running Acrobat 9 Standard. Thanks, Devin

  • Tax and amount total should show in the line item of confirmation screen

    Hi All, I need to add the Tax and amount total fields in the line item of confirmation screen for service cart. Could someone please tell me how and where should I add and write the neccessary logic for that. We are on version SRM 3.0. Thanks, Kumar

  • Error code 4310

    Hi I know there has been a few discussions regarding error code 4310 when trying to burn CDs on itunes while my computer runs Windows 8. I have treid the solution of slowing down speed etc but I cant get it to work yet does anyone have another idea/s