Is thr ne way to word wrap in main window...?

i m making sap script in a tabular fomat wth 15 fields (horizontal) in A4 size so hw to do word wrap in main window for differ differ variables for getting proper result in A4 size format.

Hi,
  We dont have word wrap format in scripts, the only option we have is we can display columns under columns like below,
Material Number  Base unit of Measure             Material type
Material Text       Alternative unit of measure     Plant
Industry sector
Rgds,
Bujji

Similar Messages

  • [Solved]Conky and word wrapping - Is there a way?

    So I have a very limited area to work with, something like 176x360 (+/- a few pixels), and I want the ability to show an RSS feed. Well, the feed works of course, but due to the limited width, I'm in great need of word wrapping, and for that problem I have found no solution and going on for 2-3 hours straight, my head hurts
    Anyway, here's my .conkyrc, not that it's needed of course.
    # ~/.conkyrc
    double_buffer yes
    use_xft yes
    xftfont Bitstream Vera Sans Mono:size=8
    xftalpha 0.8
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_colour hotpink
    own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager
    minimum_size 176 360
    maximum_size 176 360
    maximum_width 176
    draw_shades no
    draw_outline no
    draw_borders no
    stippled_borders 0
    border_margin 0
    border_width 0
    default_color green
    default_shade_color green
    default_outline_color green
    alignment bottom_right
    gap_x 16
    gap_y 16
    no_buffers yes
    uppercase no
    TEXT
    $alignc${nodename}
    $alignc${sysname} ${kernel}
    $hr
    CPU:$alignr$cpu% ${cpubar 10,106}
    RAM:$alignr$memperc% ${membar 10,106}
    HDD:$alignr${fs_used_perc /}% ${fs_bar 10,106 /}
    BAT:$alignr${battery_percent}% ${battery_bar 10,106}
    $hr
    Download: Upload:
    eth0 ${downspeed eth0} $alignr${upspeed eth0}
    wlan0 ${downspeed wlan0} $alignr${upspeed wlan0}
    $hr
    ${alignc}ARCH NEWS
    ${rss http://www.archlinux.org/feeds/news/ 1 item_titles 10 }
    I know this looks confusing and probably is full of critical error, but that simple because I'm a conky noob. I basically just downloaded a profile I liked and completely changed it over the course of a few hours.
    Anyway, I'm rambling again, but if you've got any idea's, please do let me know.
    Best regards.
    Last edited by zacariaz (2012-08-27 17:19:35)

    Okay, so I've found sort of a solution to part of the problem, so what I have so far look like this:
    wget -quiet -O - archlinux.org/feeds/news/ | fmt -w 25 -g 25
    It works as long as there are no words longer than 25 character, which I should think is rare, even including package names and such.
    However there's still the issue parsing the xml so I get only what I want:
    <item><title>$content</title><link>
    This may be solved using some sort of terminal rss parser, but I would rather prefer not to.
    Then there's the issue with reloading.
    My current conky is set to reload every second, but of course one can't just pull the feed every second and I'm not convinced that conky has any built in solution for that problem. Of course I can always start a cronjob and save it all to a file, but portability would be nice.
    anyway, I'll return later.

  • Webforms - Wrap Text/Word Wrap for Column Headings

    I have some member aliases that are set as my webform's column headings, but they are fairly long. Setting the column width to a custom value that fits most of the text in the heading makes the form very wide and ugly to work with. I don't see any option to Wrap Text or use Word Wrap in the column headings. Is there any way to do this?
    Thanks!

    Hi,
    I am not aware of any option which allows you to wrap the text, it may be possible customizing the [CSS |http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_hp_admin/ch12s03.html] though to be honest I am not even sure about that and even if it was possible it would apply to all apps.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How can I turn off word wrap in the View Source output?

    I'm trying to extract HTML from Word and one way to do that is to save the Word file as a .htm file and then View Source in a browser and copy that. But the words are wrapped in the View Source file. I want each paragraph to be all on one line. Is there a setting for the View Source feature that will turn off word wrap?
    Once I have that done and copied into a plain text editor, I will use Search>Replace to get rid of all the stuff Word puts there and just end up with the simple paragraph tags at the end of each paragraph, all on one line.

    You can disable wrapping and syntax highlighting in the View menu in the Edit > View Source window.

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • Force word wrap in JTextPane (using HTMLEditorKit)

    Hi!
    I have a JTextPane on a JScrollPane inside a JPanel. My text pane is using HTMLEditorKit.
    I set the scrolling policies of my JScrollPane to: JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED & JScrollPane.HORIZONTAL_SCROLLBAR_NEVER.
    I did not find in JTextPane�s API any relevant property I can control word-wrapping with (similar to JTextArea�s setLineWrap) and I have tried a few things to force word-wrapping but nothing worked...
    What happens is my text is NOT being wrapped (even though there is no horizontal scrolling) and typed characters (it is an enabled editable text componenet) are being added to the same long line�
    I�d like to force word-wrapping (always) using the vertical scroll bar whenever the texts extends for more then one (wrapped) line.
    Any ideas?
    Thanks!!
    Message was edited by:
    io1

    Your suggestion of using the example only holds if it fits the requirements of the featureDid your questions state anywhere what your requirement was?
    You first questions said you had a problem, so I gave you a solution
    You next posting stated what your where currently doing, but it didn't say it was a requirement to do it that way. So again I suggested you change your code to match the working example.
    Finally on your third posting you state you have some server related issues causing the requirement which I did not know about in my first two postings.
    State your problem and special requirments up front so we don't waste time quessing.
    I've used code like this and it wraps fine:
    JTextPane textPane = new JTextPane();
    textPane.setContentType( "text/html" );
    HTMLEditorKit editorKit = (HTMLEditorKit)textPane.getEditorKit();
    HTMLDocument doc = (HTMLDocument)textPane.getDocument();
    textPane.setText( "<html><body>some long text ...</body></html>" );
    JScrollPane scrollPane = new JScrollPane( textPane );If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • JOptionPane.showMessageDialog() - word wrapping exceptions?!

    Hey ppl,
    Probably a silly question...
    I'm currently working with JDBC, and SQLexceptions can be very long! Currently displaying them in a JOptionPane.showMessageDialog() (as i guess most people do?), but being so long they cause it to span the whole screen & then some!
    I looked through the JOptionPane API, but didn't spot anything that might help. Is there a way to get this exception to dispaly on multiple lines, kinda like word wrap in notepad?
    Cheers for any suggestions.
    Jim

    I can't speak for other developers..But as for myself, I rarely if ever print error messages to the JOptionPane. Almost always, I print my error messages and the stack if necessary, to the ouput. This is either a command line window, console, log file, or output screen in an ide depending upon how you program. My code looks something like this.
    catch(Exception e)
        System.out.println(e.getMessage());  // Will print only the message property of the exception
        e.printStackTrace();  // Will print the stack for more information
    }Sorry I couldn't answer your question directly. Maybe someone else can. Hope I was helpful anyway.

  • Prob with fixed column widths and word wrapping in viewer

    i have a report where each record has a very long paragraph of text in it.
    In desktop and plus, the text column is at a fixed width and the text just wraps nicely according to the column width.
    But in Viewer, the column widths do not stay fixed, the text does not wrap, and the long text is displayed in a single line that completely stretches the column width off the page and requires a horizontal scroll bar.
    is there anyway to fix the column width in viewer, have the text naturally wrap, and prevent the column stretching. All word wrapping settings are on, but seem to have no effect. I can't seem to find any solution to this.
    Thanks...

    Hi Pritam,
    Per my understanding that you can't see the vertical scrollbar of the ReportViewer controls 2012 to scroll for the grid rows, but can see the vertical scrollbar of the web application, you also can't fix the headers while scrolling, right?
    I have tested on my local environment and can't reproduce your issue, but you have an alternative way to add some css  to the web form's source code to display the vertical scrollbar.
    Details information below for your reference:
    Please check below properties setting of the reportviewer which control the visibility of the scrollbar:
    AsyncRendering="true"
    SizeToReportContent="false"
    Please check if this problem also occur on other version of IE and other type of browser.
    Please check if you have done correct setting of the Fix data to freeze the table header as the step of below:
    http://technet.microsoft.com/en-us/library/bb934257(v=sql.100).aspx
    If step1 doesn't work, please click the source of webform.aspx and add below CSS to add the vertical scrollbar manually:
    #ReportViewer1 {
              overflow-y: scroll;
    Run the application you will see it display as below:
    Similar thread for your reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/f96b3b56-e920-411b-82ea-40467c922e66/reportviewer-control-vertical-scroll-bars
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • Word Wrap in JTextPane

    I'm working with just a JTextPane, no JScrollPane around it or anything.
    I would like the JTextPane to use word wrap, but it looks like by default it does not. I looked through some API stuff and tutorials and found nothing on the subject.
    The code is trivial and pointless to post right now. All I dd was make a JTextPane via new JTextPane() (no arguments or anything) and type in it enough to see if it word wrapped and it didn't.
    Is there a way to enable word wrap on JTextPanes?

    no JScrollPane around it or anything.The scroll pane forces the wrapping because it enforces the width limit. Otherwise there is no limit.
    You can use setPreferredSize(...) to force the width, but then that also restricts the height.
    Reply 6 of this posting may give you some ideas.

  • Word Wrapping JLabel

    I'm having trouble getting JLabel's to word wrap. I've tried using html tags. Is there any way I ca do this? What I'm trying to do is read in from a file, get Questions and Answers, and display quesitons and answers to a JLabel using setText(). The dimensions are (400, 450) but even with html tags on the text I'm setting, it just runs right off the panel.
    Any suggestions would be much appreciated.
    Thanks,

    Below is my JTextArea. As you can see I have it set for 2 rows and 40 col. When I run the program, it's still just one line of text straight off my panel.
    Do you see anything I'm missing here?
                quesJTextArea = new JTextArea("",2,40);
                quesJTextArea.addMouseListener(this);
                quesJTextArea.setLineWrap(true);
                quesJTextArea.setWrapStyleWord(true);
                quesJTextArea.setEditable(false);
                quesJTextArea.setBackground(Color.gray);

  • Word wrap in nano does not work.

    Hello, I am trying to word wrap in nano the way it does in notepad and gedit (new line once you reach the edge of the screen/window). However, when I try nano -w rick.sh it give me the help screen and I see that -w is not an option. When I use set nowrap in the ~/.nanorc it says nowrap isn't recongized, also, -r <y> fails to work as well. What should I do?
    Last edited by fawx (2008-10-15 01:34:45)

    The reason might be the configure-parameter "--disable-wrapping" in nano's PKGBUILD. I would try this: get the PKGBUILD, remove the parameter, run makepkg. If makepkg finishes successfully, remove the nano-packages installed from repository and replace with the new created package.

  • Word Wrap In Excel File

    Hi experts,
    I am trying to send an excel file as attachment . I have a column called remarks which is way too long. So  i need to Wrap the text
    Can any one help me out in this?
    CONCATENATE DUMMY BUKRS WERKS  it_inv-bstnk_vf IT_INV-ORT01 VEHNO 'SUGAR' FKLMG BP EXCDUTY EXINVNO
    EXDAT NETVL IT_INV-NAM_1 IT_INV-KZABE IT_INV-KZGBE  INTO IT_ATTACH SEPARATED BY CON_TAB.
    CONCATENATE IT_ATTACH CL_ABAP_CHAR_UTILITIES=>CR_LF INTO IT_ATTACH."nam_1 has to be Word Wrapped
    APPEND IT_ATTACH.
    With thanks in Advance
    Syed Ibrahim .G

    thanks simone,
    I tried with converting to XML and then to excel.It is getting generated , but i cannot open the excel file.
    It is showing the error when i am trying to open the file in the log.
    XML PARSE ERROR:  Undefined namespace
    this is the code i am using.
      l_ixml = cl_ixml=>create( ).
    * Creating the DOM Object Model
      l_document = l_ixml->create_document( ).
    * Create Root Node 'Workbook'
      l_element_root  = l_document->create_simple_element( name = 'Workbook'  parent = l_document ).
      l_element_root->set_attribute( name = 'xmlns'  value = 'urn:schemas-microsoft-com:office:spreadsheet' ).
      call method l_element_root->set_attribute_node"( ns_attribute ).
      exporting
        NEW_ATTR = ns_attribute.
      r_element_properties = l_document->create_simple_element( name = 'TEST_REPORT'  parent = l_element_root ).
      l_value = sy-uname.
      l_document->create_simple_element( name = 'Author'  value = l_value  parent = r_element_properties  ).
      r_styles = l_document->create_simple_element( name = 'Styles'  parent = l_element_root  ).
    call method r_style->set_attribute_ns
      exporting
         name = 'ID'
         prefix = 'ss'
         value = 'Header' .
      r_format  = l_document->create_simple_element( name = 'Font'  parent = r_style  ).
      r_format->set_attribute_ns( name = 'Bold'  prefix = 'ss'  value = '1' ).
      r_format  = l_document->create_simple_element( name = 'Interior' parent = r_style  ).
      r_format->set_attribute_ns( name = 'Color'   prefix = 'ss'  value = '#92D050' ).
      r_format->set_attribute_ns( name = 'Pattern' prefix = 'ss'  value = 'Solid' ).
      r_format  = l_document->create_simple_element( name = 'Alignment'  parent = r_style  ).
      r_format->set_attribute_ns( name = 'Vertical'  prefix = 'ss'  value = 'Center' ).
      r_format->set_attribute_ns( name = 'WrapText'  prefix = 'ss'  value = '1' ).
      r_border  = l_document->create_simple_element( name = 'Borders'  parent = r_style ).
      r_format  = l_document->create_simple_element( name = 'Border'   parent = r_border  ).
      r_format->set_attribute_ns( name = 'Position'  prefix = 'ss'  value = 'Bottom' ).
      r_format->set_attribute_ns( name = 'LineStyle'  prefix = 'ss'  value = 'Continuous' ).
      r_format->set_attribute_ns( name = 'Weight'  prefix = 'ss'  value = '1' ).
      r_format  = l_document->create_simple_element( name = 'Border'   parent = r_border  ).
      r_format->set_attribute_ns( name = 'Position'  prefix = 'ss'  value = 'Left' ).
      r_format->set_attribute_ns( name = 'LineStyle'  prefix = 'ss'  value = 'Continuous' ).
      r_format->set_attribute_ns( name = 'Weight'  prefix = 'ss'  value = '1' ).
      r_format  = l_document->create_simple_element( name = 'Border'   parent = r_border  ).
      r_format->set_attribute_ns( name = 'Position'  prefix = 'ss'  value = 'Top' ).
      r_format->set_attribute_ns( name = 'LineStyle'  prefix = 'ss'  value = 'Continuous' ).
      r_format->set_attribute_ns( name = 'Weight'  prefix = 'ss'  value = '1' ).
      r_format  = l_document->create_simple_element( name = 'Border'   parent = r_border  ).
      r_format->set_attribute_ns( name = 'Position'  prefix = 'ss'  value = 'Right' ).
      r_format->set_attribute_ns( name = 'LineStyle'  prefix = 'ss'  value = 'Continuous' ).
      r_format->set_attribute_ns( name = 'Weight'  prefix = 'ss'  value = '1' ).
      r_worksheet = l_document->create_simple_element( name = 'Worksheet'  parent = l_element_root ).
      r_worksheet->set_attribute_ns( name = 'Name'  prefix = 'ss'  value = 'Sheet1' ).
      r_table = l_document->create_simple_element( name = 'Table'  parent = r_worksheet ).
      r_table->set_attribute_ns( name = 'FullColumns'  prefix = 'x'  value = '1' ).
      r_table->set_attribute_ns( name = 'FullRows'     prefix = 'x'  value = '1' ).
      r_column = l_document->create_simple_element( name = 'Column'  parent = r_table ).
      r_column->set_attribute_ns( name = 'Width'  prefix = 'ss'  value = '40' ).
      r_column = l_document->create_simple_element( name = 'Column'  parent = r_table ).
      r_column->set_attribute_ns( name = 'Width'  prefix = 'ss'  value = '90' ).
      r_column = l_document->create_simple_element( name = 'Column'  parent = r_table ).
      r_column->set_attribute_ns( name = 'Width'  prefix = 'ss'  value = '140' ).
      r_column = l_document->create_simple_element( name = 'Column'  parent = r_table ).
      r_column->set_attribute_ns( name = 'Width'  prefix = 'ss'  value = '150' ).
    With thanks in advance,
    Syed Ibrahim . G

  • Word Wrap very annoying?

    I just switched over to Dreamweaver because of the built in ftp server functionality.  So far, I have found it to be a very nice editor. 
    One problem I have it with wordwarp in the coding.
    If a line is wrapped, why does it not indent to the same column that the line started on. 
    For example if I was inside several elements and this particular <p> started in column 20, if the line runs over, it wraps and the next line starts on column 1.  This makes the code very hard to read as you have out of place text.
    <body>   
         <div>
              <p>This is just a long sentence with a bunch of rambling so the line will wrap back
    around to the first column so you can see what I am talking about.
         <div>
    </body>
    It would be so much better if it looked like this:
    <body>
         <div>
              <p>This is just a long sentence with a bunch of rambling so the line will wrap back
              around to the first column so you can see what I am talking about.
         <div>
    </body>
    Is there way to do this?
    I have searched the adobe forums and google, but I feel like I am just searching for the wrong thing because all I ever come up with at the most is how to turn word wrapping on or off.

    You can turn on that style of word wrapping, but it's not enabled by default because it relies on inserting a hard newline character each time a line is wrapped. Newline characters are treated by JavaScript as indicating the end of a statement, so this style of wrapping can break JavaScript on your page if you're not careful.
    To enable hard wrapping with text indentation, open Preferences (Edit menu on Windows, Dreamweaver menu on a Mac), and select the Code Format category. Select the Automatic wrapping checkbox and set the column (character) at which you want the line to be wrapped.
    The Dreamweaver default is to use soft wrapping, which is controlled by View > Code View Options > Word Wrap. This option toggles soft wrapping on and off. A soft wrap automatically wraps code when it reaches the right edge of Code view, but without inserting a newline character.

  • Dynamically word wrap in a JLabel

    I have several JLabels in a complex layout that has a JSplitter and is in a resizeable window.
    I would like it if there isn't enough room for the text of the JLabel to fit on one line, but there is enough vertical room (there almost always is), for the JLabel to automatically word wrap, and become 2 or three line, as needed. (There are usually only 2 or three words in these JLabels.
    I haven't found a way to do this. I know about putting HTML in the JLabel lets you put <BR>s in, but I would like the JLabel to be only one line if possible, going to two line if there isn't enough room to fit all the text on one line.
    I searched this forum, and found a suggestion to use a JTextArea made up to look like a JLabel ( http://forum.java.sun.com/thread.jsp?forum=57&thread=399180 second reply from bottom ), but this has it's own problems. The JTextAreas, try to take up as much vertical space as possible instead of only as much space a necessary (as a JLable does) in the layout that I'm using.
    Is there any way of doing this?

    JLabel label = new JLabel();
    label.setLayout new BorderLayout() ;
    JTextPane pane = new JTextPane();
    pane.setBackground(label.getBackground());
    // or try making it opaque
    pane.setText("long text here");
    label.add(pane,BorderLayout.CENTER);The above still has the problem of wanting its preferred size to be calculated from the text layed out in one line. I was digged around in my Java2D folder and found some old code I wrote, based on something by J. Knudsen:
    import java.awt.*;
    import java.awt.font.*;
    import java.text.*;
    import javax.swing.*;
    public class JMultilineLabel extends JComponent {
        private String text;
        private Insets margin = new Insets(5,5,5,5);
        private int maxWidth = Integer.MAX_VALUE;
        private boolean justify;
        private final FontRenderContext frc = new FontRenderContext(null, false, false);
        private void morph() {
            revalidate();
            repaint();
        public String getText() {
            return text;
        public void setText(String text) {
            String old = this.text;
            this.text = text;
            firePropertyChange("text", old, this.text);
            if ((old == null) ? text!=null : !old.equals(text))
                morph();
        public int getMaxWidth() {
            return maxWidth;
        public void setMaxWidth(int maxWidth) {
            if (maxWidth <= 0)
                throw new IllegalArgumentException();
            int old = this.maxWidth;
            this.maxWidth = maxWidth;
            firePropertyChange("maxWidth", old, this.maxWidth);
            if (old !=  this.maxWidth)
                morph();
        public boolean isJustified() {
            return justify;
        public void setJustified(boolean justify) {
            boolean old = this.justify;
            this.justify = justify;
            firePropertyChange("justified", old, this.justify);
            if (old != this.justify)
                repaint();
        public Dimension getPreferredSize() {
            return paintOrGetSize(null, getMaxWidth());
        public Dimension getMinimumSize() {
            return getPreferredSize();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            paintOrGetSize((Graphics2D)g, getWidth());
        private Dimension paintOrGetSize(Graphics2D g, int width) {
            Insets insets = getInsets();
            width -= insets.left + insets.right + margin.left + margin.right;
            float w = insets.left + insets.right + margin.left + margin.right;
            float x = insets.left + margin.left, y=insets.top + margin.top;
            if (width > 0 && text != null && text.length() > 0) {
                AttributedString as = new AttributedString(getText());
                as.addAttribute(TextAttribute.FONT, getFont());
                AttributedCharacterIterator aci = as.getIterator();
                LineBreakMeasurer lbm = new LineBreakMeasurer(aci, frc);
                float max = 0;
                while (lbm.getPosition() < aci.getEndIndex()) {
                    TextLayout textLayout = lbm.nextLayout(width);
                    if (g != null && isJustified() && textLayout.getVisibleAdvance() > 0.80 * width)
                        textLayout = textLayout.getJustifiedLayout(width);
                    if (g != null)
                        textLayout.draw(g, x, y + textLayout.getAscent());
                    y += textLayout.getDescent() + textLayout.getLeading() + textLayout.getAscent();
                    max = Math.max(max, textLayout.getVisibleAdvance());
                w += max;
            return new Dimension((int)Math.ceil(w), (int)Math.ceil(y) + insets.bottom + margin.bottom);

  • Word wrap on scrolling textPane

    Hi,
    How do I turn the word wrap off on a textPane so I can have a scrollable continuous string?
    Thanks
    Andy

    Having read different posts on this forum I have determined that there are two ways to turn line wrapping off:
    1) add the JTextPane to the center of a JPanel using the BorderLayout
    2) override the getScrollableTracksViewportWidth() method ot JTextPane. (after testing I determined it was sometimes necessary to also override the setSize() method as well. )
    Here is my sample program showing the two approaches.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class TestNoWrap extends JFrame
         JTextPane textPane;
         JScrollPane scrollPane;
         public TestNoWrap()
              JPanel panel = new JPanel();
              panel.setLayout( new BorderLayout() );
              setContentPane( panel );
              // no wrap by adding a text pane to a panel first
              textPane = new JTextPane();
              textPane.setText("1234567890 1234567890 1234567890");
              JPanel noWrapPanel = new JPanel();
              noWrapPanel.setLayout( new BorderLayout() );
              noWrapPanel.add( textPane );
              scrollPane = new JScrollPane( noWrapPanel );
              scrollPane.setPreferredSize( new Dimension( 200, 100 ) );
              panel.add( scrollPane, BorderLayout.NORTH );
              // no wrap by overriding text pane methods
              textPane = new JTextPane()
                   public void setSize(Dimension d)
                        if (d.width < getParent().getSize().width)
                             d.width = getParent().getSize().width;
                        super.setSize(d);
                   public boolean getScrollableTracksViewportWidth()
                        return false;
              textPane.setText("1234567890 1234567890 1234567890");
              scrollPane = new JScrollPane( textPane );
              scrollPane.setPreferredSize( new Dimension( 200, 100 ) );
              panel.add( scrollPane );
         public static void main(String[] args)
              TestNoWrap frame = new TestNoWrap();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);

Maybe you are looking for

  • Standard report on Stock Status

    Hi, I need stock report in Inventory with the following output fields, 1.Material 2.Material Description 3.Flagged Material For deletion (Yes/No) 4.Plant 5.Storage Location 6.Division 7.Valuated Stock (Qty & Value) 8.Consignment Stock (Qty & Value) 9

  • In Smartform How to display footer & some secndry window after Main window?

    Hi, My requirement in Smartform is to display footer and and secondary window  after the Main window. also if item goes to 2nd & 3rd Page then also after main window footer and some secondary window should appear. Do i have to maintain footer and sec

  • Need Office documents in SharePoint to open in WebApps

    I have a client who has a tall order at least as far as I'm concerned. I am not a SharePoint person, just a server admin. My client has SharePoint 2013 running which is accessible from the Internet by providing domain credentials for the domain on hi

  • SRM 7.0 ROS: Temporary Business Association Management

    Hi Guru, It is possible manage with SRM 7.0 component ROS the qualification process for a Temporary Business Association. For me a Temporary Business Association has the following meaning: This is a system of collaboration between companies lasting f

  • Resetting rpd Password (Informative)

    Hello Everybody, When i am doing some R&D work today, I come across a situation how to reset the password for rpd where I forgot the password for Administrator. All existed solutions (like NQSChangepassword.exe command) have associated with mentionin