Need to 5 spaces before each paragraph and  5 lines between paragraphs

Hello,
I need to write a program to insert 5 spaces (indent) before each 1st line of the paragraph and 5 spaces between each paragraph....I am new to java so I don't understand everything I write and I try and use what is out of the book...so far have done well until this assignment. My program below does create a new history.d2 file but it is blank....anyone have any input to offer or can you help me understand where I am going wrong in the program....thank you kindly.
I am playing with the program now just to see if I can find my error but of course don't fully understand the function of every line so having trouble finding my error.....at the end of my program is the file of what I am trying to edit into the new file history.d2.
import java.io.*; //import class we need in order to read from a file
import java.util.Scanner; //import class we need in order to read from a file
public class History     //class History
     public static Scanner inFile;
     public static PrintWriter outFile;
     public static void main(String[] args) //main method
          throws IOException //a pre-defined Java exception - if file history.d1 not found, throws IOException error
          String inputString;
     //     int index;
          Scanner inFile= new Scanner(new FileReader("history.d1")); //it opens history.d1
          PrintWriter outFile=     new PrintWriter(new FileWriter("history.d2")); //instantiates an output file with the name "history.d2"
          while (inFile.hasNextLine())     
          inputString=inFile.nextLine();
     //     index=inputString.indexOf(' ');
     //     while (index != -1)
          if (inputString.length()!= 1)
               outFile.println(" ");
          else if (inputString.length() == 1)
               System.out.println();
               System.out.println();
               System.out.println();
               System.out.println();
               System.out.println();               
               outFile.close();
               inFile.close();
history.d1 file:
The Abacus (which appeared in the sixteenth century) was the
first calculator. In the middle of the seventeenth century
Blaise Pascal, a French mathematician, built and sold gear-
driven mechanical machines which performed whole number
addition and subtraction. (Yes, the language Pascal is named
for him.)
Later in the seventeenth century a German mathematician
Gottfried Wilhelm von Leibniz built the first mechanical
device designed to do all four whole number operations:
addition, subtraction, multiplication and division. The
state of mechanical gears and levers at that time was such
that the Leibniz machine was not very reliable.
It wasn't until the nineteenth century that the next major
step was taken, this time by a British mathematician.
Charles Babbage designed what he called his analytical
engine. His design was too complex for him to build with the
technology of his day, so his design was never implemented.
His vision, however, included the important components of
today's computers. His design was the first to include a
memory so that intermediate values did not have to be re-
entered. His design also included the input of both numbers
and mechanical steps on a type of punched card developed in
the late eighteenth century by Joseph Jacquard to be used
with a mechanical loom.
Ada Agusta, Countess of Lovelace, was a most romantic figure
in the history of computing. Ada, the daughter of Lord Byron
(the English poet), was herself quite a mathematician. She
became interested in Babbage's work on the analytical engine
and extended his ideas (and corrected some of his errors).
Ada is credited with being the first programmer. The concept
of the loop--a series of instructions that repeat--is
attributed to her. Ada, the language used by the Department
of Defense, is named for her.
During the later part of the nineteenth century and the
beginning of the twentieth century advances were made
rapidly. William Seward Burroughs produced and sold a
mechanical adding machine (that worked!). Dr. Herman
Hollerith developed the first electro-mechanical tabulator
which used a punched card. Data was represented by holes
punched on the card in certain positions. Descendants of
this card are still in use today. Dr. Hollerith formed a
company that is known today as IBM.
In 1936 a theoretical development took place that had nothing
to do with hardware per se but profoundly influenced the
field of Computer Science. Alan M. Turing, another British
mathematician, invented an abstract mathematical model called
a Turing machine, laying the foundation for a major area of
computing theory.. The most prestigious award given in
Computer Science (equivalent to the Fielding Medal in
Mathematics or a Nobel Prize in other sciences) is the Turing
Award, named for Alan Turing. A current Broadway play deals
with his life. Analysis of the capabilities of Turing
machines is a part of the theoretical studies of all Computer
Science students.
By the outbreak of World War II, several computers were under
design and construction. The Harvard Mark I and the ENIAC
are two of the more famous machines of the era. John von
Neumann (an American mathematician this time) who had been a
consultant on the ENIAC project started work on another
machine known as EDVAC which was completed in 1950. In 1951
the first commercial computer, UNIVAC I, was delivered to the
Bureau of the Census.
Von Neumann is credited with the development of two very
important concepts. The first is that the instructions that
operate the machine should be stored in the machine along
with the data to be operated on. The second is that data
(and instructions) should be represented in the binary number
system rather than the decimal number system.
The general organization of a computer has remained constant
over the last 40 years. This organization or architecture is based
on the ideas of von Neumann and bears his name. The
essence of this architecture is sequentiality. That is,
instructions (a program) are stored in sequential memory
locations in binary form and are executed in sequence, one
after the other.

Each paragraph is terminated in your text file by a newline character. So effectively what scanner.readLine() is doing is reading a paragraph of text.
1. Read paragraph into String (readLine())
2. Print or prefix 5 spaces to String.
3. Print 5x newline character
Mel

Similar Messages

  • Why RandomAccessFile inserts space before each character while writing?

    Ater running the following code, the file test.txt contain:
    a b c d e f g h i j k l m n o p q r s t u v w x y z
    Why writeChars() inserted a space before each charecter?
    How to avoid this unwanted insertion?
    try {
    RandomAccessFile raf = new RandomAccessFile ("c:/test.txt", "rw");
    raf.writeChars("abcdefghijklmnopqrstuvwxyz");
    raf.close();
    catch(Exception e) {
    System.out.println(e.getMessage());
    }

    a char in java is a 16 bit datatype. (Allowing special chars like Norwegian ��� ���, German �� and many more from many languages). The ASCII system uses bytes for characters. (Allowing only 256 different chars). If you reed the file as byte you must write it as bytes as well. If you write the file as chars (16 bit cars) you must read the file as (16 bit) chars as well.

  • I need to clear space on my mac and have 2 other devices I need space on- IpHone and Ipad.  I have Itunes match.  If I delete the library from my computer, how can I play music from the cloud on all devices.  S

    I am almost out of space on my mac and Ipad.  Need to clear songs off, but afraid I won't be able to listen without going to my external hard drive.  I have Itunes match but don't know how they are accessed from the cloud.  Thoroughly confused and frustrated.  Hope someone can help.
    Another question is my Iphotos are taking up tons of space and I don't know if they are in cloud or best way to back up.  Any thoughts?

    If you have iTunes Match, and your music is in your Match library, you can access it from iCloud on all your devices, provided they are signed into your iTunes Match account.  Make sure you keep a backup of your music somewhere though as the match process isnt' perfect and you may find that some of your iTunes Match music isn't exactly the same as the original (see https://discussions.apple.com/docs/DOC-4112).
    The best way to back up your photos is to import them to your computer as explained here: http://support.apple.com/kb/HT4083.  If you are out of room on your Mac, get an inexpensive external drive to save your photos on.

  • Do I need to have data before performing Drag and Drop????

    I have gotten drag and drop working with Swing in JDK 1.4b2 using "URL-based" files instead of operating system native files. The way this was accomplished by creating a wrapper class that sub-classed File and would download the contents of the URL to a temporary file and then initiate a normal drag and drop operation using the normal java file mechanisms. However, when you have a large file, the operation can take too long since I am fronting all of the effort at the start of the drag. I would like to be able to delay the need to produce the bytes/files to give to the operating system until after there has been a successful drop, at which point I can do the heavy lifting and raise a dialog telling them that the action is commencing. As best as I can tell, you must have all of the data BEFORE any operation (which could be a potential design flaw!!)
    So, is there a way to get a hook that there has been a successful drop to a vm-external drop target before the VM gives the data over? Even if I create my own data flavor (which isn't well documented outside of Text types) won't I still run into the same problems? Am I just overlooking something simple?
    Thanks for your help.

    Hello
    I've had the same problem, but take a look at: http://foxtrot.sourceforge.net/
    You can use their API to start the long consuming time job (reading files from the network) and also to paint a progress bar, showing the progress in the Event Dispatch Thread.
    This is how I've solved my problem:
    I've passed a MyTransferable object to the startDrag method of the DragGestureEvent event.
    In the getTransferData method of MyTransferable object (that implements Transferable interface) I've used the Worker.post method of their API which reads the file from the network and updates a progress bar.
    The API lets the Event Dispatch Thread enter but not return from the listener method (getTransferData in my case), instead rerouting the Event Dispatch Thread to continue dequeuing events from the Event Queue and processing them (repaint the progress bar). Once the worker thread has finished, the Event Dispatch Thread is rerouted again, returning from the listener method.

  • I have one site in my browsing history that won't erase for some reason, and it's been crashing Firefox every time I try to erase it. I changed my security preferences to clear history before each session, and now I can't open Firefox at all. Help.

    The site in question was the homepage for Air BnB (http://www.airbnb.com/). It's never given me problems before, and didn't even after this particular instance. I would like to continue using Firefox, but it ill no longer open, I'm assuming because it gets stuck trying to clear the history (as per my changed preferences).
    Is there a way to uninstall the program without losing my bookmarks?
    Is there a way to manually clear this problem with my history outside the program?

    Have you looked for the previous render files? Show contents of your library and see if there are any files in the Render folder from last night.

  • What are the things that need to be done before creating quote and order

    Hi guys
    We have installed ECC and just for testing purpose we want to enter some basic data starting from creating couple of customers, department, quote and order.
    Is there a simple way (steps) to follow.
    The reason for asking this question is that we don't know where to start.
    Any suggestions will be highly appreciated.
    Thanks
    Ram

    Hello,
    If your organisational structrues are perfect, then check with MM and FI team for their opinion. If everything is right, then create customers, maintain pricing condition.
    Try to create a sales order or quotation. Save it, check for any errors, rectify it, then proceed for delivery.
    Follow simple process first, pick the delivery and do the PGI.
    Create a billing document, and check it is posting correctly.
    This is one process cycle. analyse for errors and modifications.
    Prase

  • How to find the paragraph and line numbers [CS3] [JS]

    Hello,
    I have a script that finds certain text formatting. Rather than having the script select all the instances of this text I have an alert that lists the page number and the contents for each found instance. The following gets those.
    var pageNumber = myFoundSet[n].parentTextFrames[0].parent.name;
    var foundContents = myFoundSet[n].contents;
    However, I would like to include the number of the paragraph where the found text resides as well as the line number in that paragraph.
    I am stumped on how to do this. Would be nice if there were a parentParagraph and a parentLine.
    Can someone point me in a direction?
    Thanks,
    Tom

    Tom,
    Assuming that you're looking for the number of the paragraph on the page, you'd need to count the number of paragraphs in the text frame that a found item occurs in. Since indexes are always counted from the beginning of the story, you isolate the text between the top of the page and the found item by starting at the index of the first insertion point of the found item's parent text frame and the found item itself. You capture that with this single long line:
    // range over ...
    paragraph_number = myFoundSet[n].parentStory.characters.itemByRange (
       // ... index of first ins. point of found item's parent text frame ...
       myFoundSet[n].parentTextFrames[0].insertionPoints[0].index,
       // ... and index of found item
       myFoundSet[n].index
       ).paragraphs.length;
    This includes any paragraph that started on the previous page. To find the found item's line number within its parent paragraph you do something similar:
    line_number = myFoundSet[n].parentStory.characters.itemByRange (
       myFoundSet[n].paragraphs[0].index, //first insertion point of paragraph
       myFoundSet[n].index
       ).lines.length;
    There's no need for parentParagraph and parentLine: myFoundSet[n].paragraphs[0] returns an item's parent paragraph, myFoundSet[n].lines[0], the item's parent line.
    Peter

  • Paragraph and line break tags not working in inserted html

    I used some code found on this forum to insert a text box with a scoll bar. The scroll bar is exactly what I needed, and I figured out how to style the text (using the text option that popped up on the far right side of the options bar), but for some reason the text all runs together. The <p> </p> tag is not creating the extra lines, nor could I get extra lines with <br/>. How can I get my paragraph spacing to show up?
    Here is the forum discussion: http://forums.adobe.com/message/4514956
    Here is the code I used:
    <style type="text/css">
         .scroll {     
             padding: 10px;     
             height: 280px;
             width: 450
    0px;
             overflow-y: scroll;
    overflow-x: hidden;;
    </style>
    <div class="scroll">
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
           Aliquam venenatis elit et dui scelerisque id condimentum
           tellus mollis. Phasellus varius augue at lectus egestas
           sit amet dapibus sem interdum. Vivamus aliquet augue vitae
           magna porttitor eget sagittis quam convallis. Integer aliquam
           sodales odio vel aliquet. Suspendisse non orci ut quam
           ultricies iaculis vitae vel neque. Sed sit amet neque a dui
           adipiscing convallis. Nam consectetur commodo arcu, eget
           feugiat risus tempus non. Suspendisse dignissim porta risus,
           eu lobortis metus facilisis non. Mauris id lacus eu tellus
           porttitor sodales in sed enim. Mauris euismod libero sed mi
           ultricies ac vehicula tellus tristique. Donec lacus tellus,
           varius sit amet mattis at, feugiat sed ante. Duis auctor
           iaculis aliquet. Vivamus fringilla nisi non eros congue
           dapibus. Praesent quis molestie mauris. Donec adipiscing
           dui ut elit interdum eu scelerisque sem pellentesque.
        </p>
        <p>Nulla pharetra nisl adipiscing ipsum fringilla at auctor
           ipsum posuere. Etiam ac dolor turpis. Nam non ligula purus.
           In metus nisl, ullamcorper ac sodales quis, molestie id leo.
           Etiam faucibus dui at eros molestie interdum. Quisque quis
           eros vel urna fermentum iaculis. Quisque vestibulum erat in
           risus lobortis malesuada rhoncus purus vestibulum. Integer
           vehicula ultrices quam, ac faucibus dui tristique sed. Duis
           nec felis mauris. Morbi non neque turpis, at lobortis mauris.
           Fusce a turpis sit amet leo ullamcorper semper et dignissim
           sem. Phasellus lacinia sodales massa, eget egestas velit
           malesuada at. Quisque feugiat erat in dolor eleifend ut
           convallis ante vehicula. Aenean a turpis neque, vitae eleifend
           augue. Class aptent taciti sociosqu ad litora torquent per
           conubia nostra, per inceptos himenaeos. Nunc porta, massa
           at viverra tincidunt, quam sem pellentesque felis, sed
           mattis lectus arcu eu turpis.
        </p>
        <p>Sed rutrum iaculis vulputate. Duis sed lectus lacus. Etiam
           faucibus, libero id placerat congue, turpis leo varius magna,
           vitae dapibus neque libero eu elit. Vivamus quis urna sed
           nibh elementum sodales quis in dolor. Sed ut metus ut metus
           facilisis fringilla vel sit amet mi. Etiam placerat lectus
           sed nibh bibendum vulputate non rhoncus est. Quisque vulputate
           luctus tincidunt. Duis quis tortor massa, sed scelerisque elit.
           Nam id vulputate orci. Morbi a porta lorem. Nunc elementum
           viverra sem quis blandit. Cras vel eros erat. Aliquam erat
           volutpat. Sed id odio nec erat viverra ultricies vel ac mi.
         </p>
    </div>

    For anyone else struggling with this problem, I chatted with support and got an answer. According to the agent "
    Muse is removing the default margin for various tags including the <p> tag to reset default styles to achieve consistency and control. All you need to do is specify the margin:1em for p tags in CSS to fix this."  Another --simpler-- solution turned out to be another suggestion the agent made: "just place <p> </p> after every closing </p> tag." The &nbsp is what turned out to work for me. Now I have a way to only show a portion of the text yet still allow the reader to access more (through a scroll bar) without leaving the page.

  • Space before a bullet list

    Hello,
    I would like to add a little more space (like a vertical indent) before the first line of a bullet list.
    You can see the text in the screenshot below :
    When I change the "Space before" value, it affects also the space in green (2).
    How can I adjust the space in red (1) without affect the space in green ?!
    Thank you for your kind attention.

    A couple of methods come to mind:
    Option 1: Use Space After on the paragraph preceeding the list.
    Option 2: Use a second bulleted paragraph style for the first line of the bulleted list with space before assigned.
    Duplicate the bullet paragraph style
    Assign the space before attribute
    Set the original bulleted paragraph style as the "next style"
    Select all bulleted text, right click on the space before bulleted paragraph style and select the "Apply Style, then next style" option

  • Should I have spaces between paragraphs or paragraph indents?

       I am creating a pdf interactive document/ebook, and am wondering whether to use a space between paragraphs or use indents. Is there a standard?

    dopfel wrote:
    Scott Falkner wrote:
    It is entirely up to you. Use one or the other, but not both. If you are using paragraph Styles it is easy to make a global change and see which reads better. Generally, I prefer spaces to indents. The space should be either one line of lead (i.e. equal to the paragraph’s leading value) or half a line of lead if one full line looks to large.
    My reply is in reference to the above quote regarding how to make a
    global change so that all of the paragraphs in the document have spaces between them w/o having to select each and every paragraph and applying the 'paragraphspacing' style.
    How do I go about this ?
    Format a paragraph as you want all similar paragraphs  to look. Now go to the Paragraph Styles panel and create a new Style. Right-click on the new style to edit the style and give it an intuitive name. Now you can format any text the same way by first selecting the text, then clicking on the style in the Paragraph Styles panel. If you later want to change all of the paragraphs using that style, just right-click on the style and change any attributes to globally change all paragraphs in the document using that style.
    secondary:  not certain the below applies to my question regarding spaces between paragraphs and changing them globally.
    i have also found and wondered about using the setting for the 'align to grid' where default is none and options are
    'all lines'  or 'first line only'.  Does this apply in any way to a regular layout of a 'novel'  ?
    i do not know what this refers to.
    The space should be either one line of lead (i.e. equal to the paragraph’s leading value) or half a line of lead if one full line looks to large.
    thanks again.
    Leading is the term for the space from the baseline of one line of text to the baseline of the next line within a paragraph. The default is “Auto”, which is 120% of the point size. For 12 point text, Auto equals 14.4 point leading. First: Don’t use Auto leading. Change the leading of your style to a number. About 120% is as good a place to start as any, but it depends on the typeface. You may decide to use 11 point text on 14 point leading.
    Because you will have columnd of text next to each other on the page, or pages of text neext to each other on a two-page spread, you want to make sure your text lines up neatly in columns or pages (although for pages it is less critical). The easiest way to do this is to use paragraph spacing equal to your leading, i.e. 14 points. This way, no matter how many paragraphs (and thus, blank lines between paragraphs) you have, the text will always have a heigh that is multiples of 14 points, so bottom baselines will always line up.
    You may decide that looks like too much space, and want to use a lower value. The next best value is half the leading, or 7 points. That way, about half of the time your columns or pages will line up and the bottom baselines will sync.
    Once again, it is ultimately up to you how you want the text to look and how you want your pages or column to look next to each other. If 14 (or whatever your leading is) looks too small or 7 (or whatever half the leading is) looks too big, then go with what looks best. Always try to keep an eye on the big picture, though. Don’t just look at one line of text, look at the entire paragraph. Don’t just look at one paragraph, look at the column. Don’t just look at one column, look at the page. Don’t just look at one page, look at the spread. And always keep the reader in mind. You are designing the document for the reader, not for yourself.

  • How Find space Used by Tables and Indexes

    Dear All(s)
    How i check space used (and number of rows) by each table and index in schema. ( can i check current space utilization and sysdate-date past in time)
    How i can check used, and free space for each database and tablespace.
    Thanks

    You can always use the search feature
    anyway
    how to calculate the percentage of free space for a table in Oracle
    Re: incorrect free space in dba_free_space
    These links could give you all the necessary info

  • How to find a carriage return and Line feed?

    I need to detect if a crriage retunr and line feed present on each row in my text file before allowing user to upload the text file
    I know how to remove them from each line but what I need is to detect them no removing them from file.
    Our concern is when the a row does not have carriage return and line feed.
    Is there a way to find this using CF? Please help
    thanks

    That is exactly the problem Dave, if some rows do not have line feed, they're not being inserted into DB, it skips other steps and go right to finish. It looks
    like the file is done processing.
    So I need to do early rejection to this kind of file.
    I used cfloop to catch anything else that do not follow the formatting rules.
    Here is what I already done:
    Right after the file got uploaded, I have these codes:   
    <cfloop  index="x" file="#MyFile#" >
      <CFSETMyLine = Replace(x,chr(9),"|", "ALL")>
      I'm using a few functions, such as, Left(), Mid(), Right(), etc to make sure certain rules are followed.
      Up till here, it's done and tested, everything is working.
      The only problem is when 1 or more rows don't end up with line feed and or carriage return.
      I plan to add some codes to check the end of each row for chr(10) since it is looping for every row anyway.
      If detected, process file normally otherwise stop processing.
    </cfloop>
    So this can't be done in CF?

  • How do I join together arcs and lines in a single Shape???

    I am out of my depth, I am probably missing something spectacular .... I need to construct a shape from arcs and lines to get something like this, only closed:
    Like a winding river sort of thing... I do not need to draw this I need to have this shape and its area available to me.... How do I join these two arcs and two lines into a shape from which I can find - area.contains(xy.getX(), xy.getY()); , preatty please?
    here is the code that causes numerous errors:
    import java.awt.*;
    import java.awt.Graphics.*;
    import java.awt.Graphics2D.*;
    import java.awt.geom.RectangularShape.*;
    import java.awt.geom.Arc2D;
    import java.awt.geom.Line2D;
    import java.awt.geom.Rectangle2D;
    import java.awt.geom.Area;
    import java.awt.geom.GeneralPath;
    class MyShapes //extends Arc2D
    public static Arc2D outerOne;
    public static Arc2D innerOne;
    public static Line2D upLine, bottomLine;
    public static Area area = new Area();
    public MyShapes(double[] upper, double [] lower)
    outerOne.setArc(upper[0], upper[1], upper[2], upper[3], upper[4], upper[5], (int)upper[6]);
    //                         x,          y,               w,          h,               OA,      AA, int OPEN =1
    innerOne.setArc(lower[0], lower[1], lower[2], lower[3], lower[4], lower[5], (int)lower[6]);
    //outerTR=this.makeClosedShape(outerTopRightArc,middleTopRightArc);
    upLine     = new Line2D.Double(outerOne.getX(),outerOne.getY(),innerOne.getX(),innerOne.getY());
    bottomLine = new Line2D.Double(outerOne.getX()+outerOne.getWidth(),outerOne.getY()+outerOne.getHeight(),innerOne.getX()+innerOne.getWidth(),innerOne.getY()+innerOne.getHeight());
    area = this.joinAll(outerOne,innerOne, upLine, bottomLine);     
    private Area joinAll(Arc2D out, Arc2D in, Line2D one, Line2D two)
    GeneralPath joiner = new GeneralPath(out);
    joiner.append(in, true);
    joiner.append(one, true);
    joiner.append(two, true);      
    Area temp = new Area(joiner);
    return temp;     
    public boolean isInArea(Point xy)
    return area.contains(xy.getX(), xy.getY());     
    public boolean isItClosed()
    return area.isSingular();     
    Thanks

    Glad to hear you find what was wrong. Still, it doesn't the main problem : why is that method crashing?
    Here is what I've done in the mean time. See if it fits your purpose.import javax.swing.*;
    import java.awt.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.geom.*;
    public class MyShapes {
         private Arc2D outerOne;
         private Arc2D innerOne;
         private Shape line1;
         private Shape line2;
         public MyShapes(double[] upper, double[] lower) {
              outerOne = new Arc2D.Double(upper[0],
                                                 upper[1],
                                                 upper[2],
                                                 upper[3],
                                                 upper[4],
                                                 upper[5],
                                                 0);
              innerOne = new Arc2D.Double(lower[0],
                                                 lower[1],
                                                 lower[2],
                                                 lower[3],
                                                 lower[4],
                                                 lower[5],
                                                 0);
              line1 = new Line2D.Double(outerOne.getStartPoint().getX(),
                                              outerOne.getStartPoint().getY(),
                                              innerOne.getStartPoint().getX(),
                                              innerOne.getStartPoint().getY());
              line2 = new Line2D.Double(outerOne.getEndPoint().getX(),
                                              outerOne.getEndPoint().getY(),
                                              innerOne.getEndPoint().getX(),
                                              innerOne.getEndPoint().getY());
         public void paint(Graphics2D aGraphics2D) {
              aGraphics2D.draw(outerOne);
              aGraphics2D.draw(innerOne);
              aGraphics2D.draw(line1);
              aGraphics2D.draw(line2);
         public static void main(String[] args) {
              double [] XO= {56, 58, 400, 280, 90, 90};// outter arc
              double [] XI={114, 105, 300, 200, 90, 90}; // inner arc
              final MyShapes myShapes = new MyShapes(XO, XI);
              JPanel panel = new JPanel() {
                   protected void paintComponent(Graphics g) {
                        super.paintComponent(g);
                        Graphics2D g2 = (Graphics2D)g;
                        myShapes.paint(g2);
              final JFrame frame = new JFrame("Test shape");
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              frame.setContentPane(panel);
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        frame.show();
    }

  • I have highlighted words in an .iba file. Now I need to increase the space before (and/or after) the paragraph it's contained in. If I increase the space after, the height of the highlighting increases also. Is there any way around this?

    I have highlighted words in an .iba file. Now I need to increase the space before (and/or after) the paragraph it's contained in. If I increase the space after, the height of the highlighting increases also. Is there any way around this?

    http://www.apple.com/feedback/kaywerty wrote:
    A rather long winded way of asking if anybody knows if it's possible to have multi-windows open
    It's not possible.
    Suggestions here -> Apple Product feedback

  • 5.2 Pages, how to create white space before and after paragraphs?

    Hi everyone,
    I'm having a very frustrating time with the new 5.2 version of pages after upgrading from a prior version. In the previous version, you could easily adjust the exact amount of white space before and after each paragraph. You were able to do this from within the inspector, but for the life of me, I cannot find it ANYWHERE in the new version and I'm ripping my hair out trying to find it.
    Surely you must be able to control the amount of space before and after each paragraph? It's totally useless to me if I can't; I want to be able to format my documents how I want; ie. plenty of white space between paragraphs and list points, not all bunched up together.
    Someone please help me! Thank you so much!

    Try telling Apple that. Start by rating/reviewing Pages in the App Store.
    I have been told repeatedly by Apple staff that the new User Interface makes it "Much simpler".
    When I ask how? …and point out how many (more) hidden steps there are, they don't want to talk anymore.
    Apple's standard response to just about everything lately, unfortunately.
    btw If you have the choice, use Pages '09 instead. Less buggy and way more features, better laid out.
    Peter

Maybe you are looking for

  • How to set a print area in Numbers

    This one should be easy: set print range for the cells that require to be printed. There does not to be a way to do it, or is it so obvious that I missed it?

  • Why can't I install iTunes on my 64-bit Windows 7 desktop?

    When I go to the installation page and input my email address, the full page doesn't seem to load, but then I click on what I assume is the "download" button (though can't really tell because the pictures don't load properly) and nothing happens.  Af

  • Backup from Ipod to computer

    I am having a hard time to backup (or synch if you will) all files from Ipod to a new computer using ONLY I-tunes. Does anyone have a step-by-step solution or a workaround using a freeware? thanks

  • Connecting Oracle DB with SQL server

    I need to connect an Oracle Data Base to a SQL Server throught a BPEL process. Somebody knows about a TUTORIAL or maybe other guide.....pls this is urgent. Thanks

  • Problems since upgrading software

    Today I upgraded my software version to 7.2 and then proceeded to download quite a few CD's. When I syncd my iPod to iTunes, it proceeds to "update" but new downloads are not on the iPod. Also, every time I attempt to sync, all playlist folders dupli