Using paint() for a JPanel in a ScrollBar

i have a class that extends JPanel and paints some graphics in it using the function paint(). like g.drawString.. i had to add an instantition of that class in the container of my main class within a scrollbar. It initially painted well but when i scroll, it gets distorted. its something like this
public class PaintedPane extends JPanel
public PaintedPane()
paint()
other codes here..
public class MainClass extends JFrame
public PaintedPane pane;
public JScrollbar scroll;
public MainClass()
pane = new PaintedPane();
scroll = new JScrollBar(pane);
it seems that the pane wont update the part of the pane not initially exposed because of the scrollBar. how can i fix it? thanks!

sorry for the wrong section.
here is the code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MainClass extends JFrame
     public TextDraw td;
     public JScrollPane pane;
     public Container c;
     public MainClass()
          c = getContentPane();
          c.setLayout(new FlowLayout());
          td = new TextDraw();
          td.setPreferredSize(new Dimension(300, 300));
          pane = new JScrollPane(td);
          pane.setPreferredSize(new Dimension(300, 200));
          c.add(pane);
          setSize(400, 400);
          show();
     public static void main(String args[])
          MainClass m = new MainClass();
          m.addWindowListener(
               new WindowAdapter()
                    public void windClosing(WindowEvent e)
                         System.exit(0);
}and another java file for the TextDraw
import javax.swing.*;
import java.awt.*;
public class TextDraw extends JPanel
   public TextDraw()
         setBackground(Color.WHITE);           
            setSize(500,  500);
            show();
   public void paint(Graphics g)
          for(int x = 0; x < 20; x++)
               g.drawString("Hello world!", 20, (x)*20);
               g.fillRect(5, (x)*20, 10, 10);
}i dont realy know what to do to fix this. And if i chang the values of the "setSize(400, 400)" of the MainClass to "setSize(300, 300)" it works fine. why is it like that? sorry im not very familiar with all the paint, paintComponent and graphics things. thanks!

Similar Messages

  • Problem refreshing when using GridBagLayout for a JPanel

    Well, i have a JPanel which use the GridBagLayout to layout the components. If i remove a component everything it's ok, i mean it disappear from the panel, but the appears when i want to add a component. It doesn't show me the new component. Any sugestion?

    Here is the all code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test {
         private JFrame f;
         private final JPanel detalii = new JPanel();
         private String[] sir1 = { "1820620160027", "Bradescu", "M", "Marius-Catalin", "Rovine bl. I29", "0745035150" };
         private String[] sir2 = { "1820620160031", "Bercea", "C", "Florin Bogdan", "Brazda bl. I29", "0745035150" };
         public Test(){
              f = new JFrame( "Test" );
              detalii.setLayout( new GridBagLayout() );
              detalii.setPreferredSize( new Dimension( 450, 400) );
              creazaDetaliiElev( sir2 );
              f.addMouseListener( new MouseAdapter(){
                   public void mouseClicked( MouseEvent evt ){
                        if( evt.getButton() == 1){
                             creazaDetaliiElev( sir1 );
                             //detalii.invalidate();
                             f.repaint();
                        } else {
                             creazaDetaliiElev( sir2 );
                             //detalii.invalidate();
                             f.repaint();
              f.getContentPane().add( detalii );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.pack();
              f.setVisible( true );
         protected void creazaDetaliiElev( String[] elev ){
              if( detalii.getComponentCount() == 0 ){                    
                   GridBagConstraints c = new GridBagConstraints();
                   c.fill = GridBagConstraints.VERTICAL;
                   JLabel lblID = new JLabel( "CNP:");
                   c.anchor = GridBagConstraints.WEST;
                   c.insets = new Insets( 5, 5, 5, 5 );
                   c.gridx = 0;
                   c.gridy = 0;
                   detalii.add( lblID, c );
                   JLabel lblNume = new JLabel( "Nume:" );
                   c.gridx = 0;
                   c.gridy = 1;
                   detalii.add( lblNume, c );
                   JLabel lblInitiala = new JLabel( "Initiala:" );
                   c.gridx = 0;
                   c.gridy = 2;
                   detalii.add( lblInitiala, c );
                   JLabel lblPrenume = new JLabel( "Prenume:" );
                   c.gridx = 0;
                   c.gridy = 3;
                   detalii.add( lblPrenume, c );
                   JLabel lblAdresa = new JLabel( "Adresa" );
                   c.gridx = 0;
                   c.gridy = 4;
                   detalii.add( lblAdresa, c );
                   JLabel lblTelefon = new JLabel( "Telefon:" );
                   c.gridx = 0;
                   c.gridy = 5;
                   detalii.add( lblTelefon, c );
                   JTextField txtID = new JTextField( String.valueOf( elev[ 0 ] ) );
                   txtID.setBackground( Color.WHITE );
                   txtID.setHorizontalAlignment( JTextField.TRAILING );
                   txtID.setEditable( false );
                   c.gridx = 1;
                   c.gridy = 0;
                   detalii.add( txtID, c );
                   JTextField txtNume = new JTextField( elev[ 1 ] );
                   txtNume.setBackground( Color.WHITE );
                   txtNume.setHorizontalAlignment( JTextField.LEADING );
                   txtNume.setEditable( false );
                   c.gridx = 1;
                   c.gridy = 1;
                   detalii.add( txtNume, c );
                   JTextField txtInitiala = new JTextField( elev[ 2 ] );
                   txtInitiala.setBackground( Color.WHITE );
                   txtInitiala.setHorizontalAlignment( JTextField.CENTER );
                   txtInitiala.setEditable( false );
                   c.gridx = 1;
                   c.gridy = 2;
                   detalii.add( txtInitiala, c );
                   JTextField txtPrenume = new JTextField( elev[ 3 ] );
                   txtPrenume.setBackground( Color.WHITE );
                   txtPrenume.setHorizontalAlignment( JTextField.LEADING );
                   txtPrenume.setEditable( false );
                   c.gridx = 1;
                   c.gridy = 3;
                   detalii.add( txtPrenume, c );
                   JTextField txtAdresa = new JTextField( elev[ 4 ] );
                   txtAdresa.setBackground( Color.WHITE );
                   txtAdresa.setHorizontalAlignment( JTextField.LEADING );
                   txtAdresa.setEditable( false );
                   c.gridx = 1;
                   c.gridy = 4;
                   detalii.add( txtAdresa, c );
                   JTextField txtTelefon = new JTextField( elev[ 5 ] );
                   txtTelefon.setBackground( Color.WHITE );
                   txtTelefon.setHorizontalAlignment( JTextField.TRAILING );
                   txtTelefon.setEditable( false );
                   c.gridx = 1;
                   c.gridy = 5;
                   detalii.add( txtTelefon, c );
              } else {
                   detalii.removeAll();
         public static void main( String[] args ){
              new Test();
    , but nothing, as you see i use invalidate() too.

  • Use paint() for print()????

    I see many print examples out there on the web and such. I am wondering why for the print function, they just don't call paint() on the component they want to print.
    For example, if you have a JTextArea and you want to print it, make the object implementint the Printable interface and have the print function just invoke paint() on that text area for each page. I did this, and don't see any problems. It was much quicker than formatting the text myself. I just modify the graphics object and pass it to the paint function and voila, it looks exactly like the JTextArea if the JTextArea were as big as the piece of paper. I am just wondering why the examples out there don't do it this way. Is there some problem I am going to run into? I have run into no problems so far and printing works fine.
    thanks for any help/suggestions.
    dean

    Indeed, that's the default for Swing components. Quoting from javax/swing/JComponent.java in src.jar:
        public void print(Graphics g) {
         setFlag(IS_PRINTING, true);
         try {
             paint(g);
         finally {
             setFlag(IS_PRINTING, false);
        }I'll note two things .. one is the AWT heavyweight components cannot be printed this way. Second, what if you want the printed representation different than the screen representation? For example, you want different font characteristics on screen than on paper because printers have much higher resolution (dpi) than screens.
    - David

  • Hello How do I delete or disable the scrollbar. I use kiosk for fulscreem wants no scrollbar What should I do?

    hello
    How do I delete or disable the scrollbar.
    I use kiosk for fulscreem wants no scrollbar
    What should I do?

    I also already deleted my phone number from iMessage on my MBP.

  • Using Paint in JFrame

    I am trying to divide a frame into a number of different rectangles, and for some reason I can't get the paintComponent to work. Help!!

    I was wrong in reply one. The paint method in JFrame shows up in the Container methods section, so JFrame uses paint as a Container.
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class PaintingDemo extends JPanel {
      int
        width,
        height;
      int[][] circles = {
        {2,20}, {100,50}, {180,200}, {90,150}
      int[][] squares = {
        {40,90}, {100,200}, {150,300}
      int[][] rectangles = {
        {100,100}, {200,100}, {300,300}
      public PaintingDemo(int width, int height) {
        this.width = width;
        this.height = height;
        setBackground(Color.pink);
        setPreferredSize(new Dimension(width, height));
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setPaint(Color.blue);
        int x,y;
        for(int i = 0; i < circles.length; i++) {
          x = circles[0];
    y = circles[i][1];
    g2.fill(new Ellipse2D.Double(x, y, 20, 20));
    g2.setPaint(Color.red);
    for(int i = 0; i < squares.length; i++)
    g2.fill(new Rectangle2D.Double(squares[i][0], squares[i][1], 10, 10));
    g2.setPaint(Color.orange);
    for(int i = 0; i < rectangles.length; i++)
    g2.fill(new Rectangle2D.Double(rectangles[i][0], rectangles[i][1], 50, 25));
    public static void main(String[] args) {
    JFrame f = new JFrame();
    f.getContentPane().add(new PaintingDemo(400,400));
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.pack();
    f.setLocationRelativeTo(null);
    f.setVisible(true);

  • Paint component inside JPanel

    Hi guys,
    I will start with the original problem and get to the only option that seems possible before hardcoding everything.
    I need to draw something like a binary tree. Jtree doesn't fall into binary because it does not have the root in the center. <1;2;6;8;9>, where 6 is the root, and 1,2 are its left child's children and 8,9 are right child's children. Since I couldn't find any possible solution of customizing JTree to draw it in binary format, I am left with the following option that is a step towards hardcoding.
    Create a subclass of JPanel and paint inside it. The full hardcode method would be to draw everything right here, ie the lines and the boxes.
    But since I need to listen to box selections using mouse, I was hoping to draw the boxes using JPanel/JLabel and override their paint() method.
    So is there a way to paint components(JLabel/JPanel and lines) into a painted component (JPanel)? Note, the container JPanel is not using any layout. everything is being drawn using paint method.

    You are probably going to want to create smaller objects that handle their own painting. For example... Create an extension of JComponent that handles painting a single node. Then create the JPanel to add those to. You can even go as far as writing your own LayoutManager to handle laying the Components out in your binary layout. This is really the most effective way to do it, especially if you want to be able to detect clicks and what not. You can just add MouseListener's to the individual components than.
    Hope this helps,
    Josh Castagno
    http://www.jdc-software.com

  • Elements 10, windows 8, 64 bit, epson artisan 835 printer: prints are really dark even after using enhancements like adjusting lighting. Prints are darker than photoshop edit screen. Prints are acceptable using paint, windows photo viewer, or gallery.

    Elements 10, Windows 8, 64 bit, Epson Artisan 835 printer: Prints are really dark even after applying enhancements, like adjusting lighting. Prints are darker than Photoshop Edit Screen. Prints are acceptable using Paint, Windows Photoviewer, or Photo Gallery.

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • Determine preferred size to be set for the JPanel attached to JScrollBar

    Determine what preferred size to be set for the JPanel attached to JScrollBar.
    Hello all, I am having a JPanel, where new components will be added into it during run-time. When there are too many components inside the JPanel, I need to re-set the JPanel preferred size so that the JScrollBar is scrollable.
    I was wondering what is the good method to determine the preferred size of JPanel during runtime?
    Currently, I am using
    myJPanel.setPreferredSize(new Dimension(
    numberOfNewComponent * preferred width of each component,
    numberOfNewComponent * preferred height of each component
    ));Is there any better alternative?
    Thank you very much.
    yccheok

    Usually a container such as JPanel will calculate its own preferred size from its layout manager - calling setPreferredSize is often unnecessary.
    When you add a component to your JPanel its preferred size will change automatically.
    What's wrong with the behaviour when you simply add your JPanel to a JScrollPane and let it manage its own preferred size?
    Hope this helps.

  • How to use renderer for a Jtree Element

    Hi all,
    i have been told to use Renderer for drawing a JTree on a JPanel.
    I mean, i want to draw each element of the JTree as a rectangle with a label inside it.....each element of my JTree contains an UserObject with a string inside it.
    Any suggestions ?
    Cheers.
    Stefano

    read the link below it shows how to use trees and tree renderer.
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

  • Attaching Variable to the Library for Report Painter for Cost center report

    Hi,
    I want to attach the Variable - "Cost element group" to the Library for Report Painter for getting Cost center report. The Cost center report should be cost element group wise with actaul, budget and variance. Please let me know the process.

    hi..
      I think you have to first define Attribute mis as "V" in Cost element master basic data tab for the elements you want to capture as varible.
      Then make a Cost element group / set in KAH1/GS01 and use it in your report.
      kkumar

  • Report Painter for PP reports

    Hi there ,
    Can any one please help me in learning how we can prepare reports using report painter ... please share with me the any learning document & resource from where I Can learn the same ...
    Secondly, do we use report painter for PP rather SCM reports ... I  have seen in all the cases it is being used in FI reporting ...
    Thanks
    Kaushik

    Dear,
    Most of the PP reports are for internal purpose so we never use the report painter.
    Report painter is available for FI module.
    Report painter is generally used for reporting from totals tables. Your requirement looks more like a query from master data tables. For this you'd better use SAP query (SQ01) or Quick Viewer (SQVI).
    Please refer the below is the links to Report Painter
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    Re: Report painter
    Hope it will clear your doubt.
    Regards,
    R.Brahmankar

  • Report Painter for all module

    Hi,
    Is report painter can be use by MM,PP,SD module ?
    in ECC6, we can use report painter for module FI, how about module MM,SD and PP ? 
    if it can use for those module too, how is the step?

    Hello Callia Raissa,
    Yes report writer can be used in logistics also. One of the way which I am aware of is described below.
    Flexible analyses allow you to can tailor the way in which key figures are combined and aggregated. This means that it is possible to both provide administrators with detailed information and management with aggregated information.
    Flexible analyses enable easy access to the Report Writer, a user-friendly tool with which you can create reports for various analyses. The Report Writer is integrated in other SAP applications, such as Extended General Ledger and Cost Center Accounting.
    Evaluation structures form the interface to the Report Writer. Evaluation structures consist of characteristics and key figures and are easy to construct.An evaluation structure with the same name exists for each information structure in the standard system.Even the self-defined information structures created in Customizing can be evaluated via the flexible analyses.
    Evaluations:You can create an evaluation on the basis of the evaluation structure.
    To define an evaluation, all you need to do is select the characteristics and key figures you require (pick-up technique).One of the especially useful features here is that you have the option of tailoring the layout of your report to suit your particular requirements. You can also define extra key figures for the reports, which are derived from existing key figures by means of calculation formulas. You can thereby multiply the key figures or divide one key figure by another.
    ============================================================
    In addition to the above you can also edit a report in logistics module with the help of a report writer. below mentioned is the process for it.
    It is now possible to edit your report data using the Report Writer. You can also change the layout of the report. The most important functions of the layout design are summarized below.
    Summation levels:In the report screen, you can use the menu sequence View ->Summation level to specify the number of summation used to calculate total values. All totals that do not lie within the specified interval will be hidden. A summation level corresponds to a hierarchical level (for example, material level). Summation level 1 is the lowest hierarchical level. Summation level 2 is the next level up, and so on. The individual values are on the summation level 0.
    The summation levels can be specified both universally (for the entire report) or locally (for specific blocks of rows). In this case, the local settings overwrite global values.
    Report views:If a report is displayed on the screen, the Report Writer will then set page breaks so that exactly one page fits into the current window. This view will be defined as the standard view. As the Report Writer always processes exactly one page, you can only use the page keys and page icons to page up and down; the scroll bars cannot be used.
    The page view can be determined via Settings-> Page view. The page breaks in the page view correspond to those defined in the report layout.
    Hide and show rows:The function Edit->Hide rows exclude certain preselected areas of your report from the display. You can undo this command with Edit ® Show rows.
    Expanding and collapsing report rows:View-> Hierarchy->Collapse allows you to hide the report rows of the sub-trees that are located underneath. View->Hierarchy ->Expand allows you to undo this command level by level.
    If you want to display all the report rows that were hidden by collapsing the hierarchy or restricting the summation levels, select, View->Hierarchy-> Expand all.
    View->Collapse all allows you to reduced every row block to the highest summation level.
    Texts and Annotations:You can create an annotation for your report.
    Select: Extras->Annotation.
    You branch into the text editor of the Report Writer.
    Via the menu sequence Settings->Texts, you can create and format a title page, the last page, as well as headers and footers using word processing functions.
    For example, you can store variables in the header for the author of the report, the date of the selection or the name of the person who last changed the report.
    Layout parameters:Using the menu sequence Settings->Layout you can specify the page format, display form, rows and columns of the report according to your needs and you can determine the settings for the graphics function. You can make these layout settings with Report->Save settings.
    Hope I had been able to help you to some extent. please assign points as reward.
    Rgds
    Manish

  • Report Painter for B/S , P&L statements

    Hii gurus
    this is ramki...
    Plssss help me in the making of Report painter for Balance Sheet and Profit And Loss Statements , as of now i didn't did Report Painter .
    I have tried no.of times , i dont know the confg also...
    My client is asking DR & Cr columns for the statements..
    can any body plsssss forward to me  report painter confg documentation...( atleat for base level confg )
    helpers will b great appreciateble..
    thanks in advance
    regards
    ramki

    Hi
    i am sending you a sample of how to createa report in report painter follow it,
    Main Steps in Creating a Report Using Report Painter
    The illustration below shows the main steps in creating a report with Report Painter:
    In this section, you learn how to create a Profit Center Accounting (PCA) report with Report Painter.
    For these sample reports, you should focus on the tables that correspond to the SAP application areas with which you are working. The examples shown in this section have been created in Release 4.6C.
    Sample Report for Gross Profit Margin
    Bungee Corporation wants to use Report Painter to create a gross margin report. This Profit Center Accounting report uses data table GLPCT. The desired PCA report displays the gross margin for each profit center.
    Below is an illustration of the completed gross margin report.
    Prerequisites to Creating a Report with Report Painter
    Before you can create a report with Report Painter, you need to:
    •     Determine the table
    •     Find the library
    •     Create sets
    •     Create variables
    The following sections explain these prerequisites.
    Determine the Table
    Before you can start creating the report, you must decide on the table you need to use. In this example, we use table GLPCT in Profit Center Accounting.
    Find the Library
    Determine the library you want to use for the desired table.
    If you need to create a library, on the SAP Easy Access screen, either:
    •     From the navigation menu, choose SAP menu &#8594; Information systems &#8594; Ad hoc reports &#8594; Report painter &#8594; Report Writer &#8594; Library &#8594; Create.
    •     In the Command field, enter transaction GR21 and choose  .
    In our example, we use existing library 8A2 for creating a report.
    Create Sets
    Create the required sets for your report. To create a set, on the SAP Easy Access screen, either:
    •     From the navigation menu, choose SAP menu &#8594; Information systems &#8594; Ad hoc reports &#8594; Report painter &#8594; Report Writer &#8594; Set &#8594; Create.
    •     In the Command field, enter transaction GS01 and choose  .
    Note that this procedure is not necessary for creating the report given in the example that follows.
    Create Variables
    Create any variables for the fields that must be entered before the report is executed. To create a variable, on the SAP Easy Access screen, either:
    •     From the navigation menu, choose SAP menu &#8594; Information systems &#8594; Ad hoc reports &#8594; Report painter &#8594; Report Writer &#8594; Variable &#8594; Create.
    •     In the Command field, enter transaction GS11 and choose  .
    Note that this procedure is not necessary for the sample report in the next section.
    Creating a Report with Report Painter
    When you are ready to create the report using Report Painter, use the following steps.
    Example Task: Creating a report using Report Painter
    1.     On the SAP Easy Access screen, either:
    o     From the navigation menu, choose: SAP menu &#8594; Information systems &#8594; Ad hoc reports &#8594; Report painter &#8594; Report &#8594; Create.
    o     In the Command field, enter transaction GRR1 and choose  .
    2.     On the Report Painter: Create Report screen:
    a.     In Library, enter the name of the library to be used for the report (for this example, 8A2).
    b.     In the Report, enter a name for your report and a short text description.
    c.     Choose Create.
    1.     
    To help you better understand how to create a report in Report Painter, the next procedures explain the varying substeps. You can either:
    o     Define the rows (or rows with a formula)
    o     Define the columns (or columns with a formula)
    o     Define the general data selection
    Define Rows
    Example Task: Defining rows (including defining a row with a formula)
    To start defining the rows, on the Report Painter: Create Report screen, double click on Row
    On the Element definition: Row1 dialog box:
    a.     To include characteristics in the first row of the report, select the desired characteristics in the Available characteristics frame (for example, Account number)
    b.     Use  to transfer the chosen characteristic to the Selected characteristics frame.
    c.     In From, enter the account number(s) you want to include in the row definition. Either enter to and from values or a group set (for example, the value 800000).
    d.     To enter the row heading, choose
    On the Text maintenance dialog box:
    a.     In Short, enter the desired short text (for example, Revenue).
    b.     To copy the short text into the Medium and Long text fields, choose Copy short text.
    c.     To continue, choose
    On the Element definition: Row1 dialog box:
    a.     To check if the selection is correct, choose  Check.
    b.     To transfer the selection to the row 1 definition, choose Confirm.
    You have now defined the first row.
    To define the second row for costs, on the Report Painter: Create Report screen, double-click on Row 2.
    On the Select element type dialog box:
    a.     Select Characteristics.
    b.     Choose
    On the Element definition Row 2 dialog box:
    a.     To include characteristics in the second row of the report, select the desired characteristics in the Available characteristics frame (for example, Account number)
    b.     Use  to transfer the chosen characteristic to the Selected characteristics frame.
    c.     In From and To, enter the account number(s) you want to include in the row definition (for example, 400000 and 490000).
    d.     To enter the row heading, choose
    On the Text maintenance dialog box:
    a.     In Short, enter the desired short text (for example, Costs).
    b.     Choose Copy short text to copy the short text into the Medium and Long text fields.
    c.     To continue, choose
    On the Report Painter: Create Report screen:
    a.     You can now choose to add further rows with other required characteristics. In this example, you can create a formula in the third row.
    b.     Double-click on Row 3.
    On the Select element type screen:
                       a. Select Formula as the row element type.
                       b. Choose
    On the Enter Formula screen:
    a.     Enter the formula for Row 3. You can either type it in or use your mouse and the formula components buttons. If you type the formula, do not forget the spaces. In this example, Y001 and Y002 represent Revenue and Costs respectively.
    b.     To check the correctness of the formula, choose  Check.
    c.     Choose
    On the resulting Text maintenance dialog box:
    a.     In Short field, enter the text for the formula field (for example, Gross Marg).
    b.     In Medium and Long fields, enter the required text (for example, Gross Margin).
    c.     Choose  .
    You have now defined three rows (Revenue, Costs, and Gross Margin).
    Define Columns
    Example Task: Defining columns
    On the Report Painter: Create Report screen, double-click on the first column, Column 1.
    On the Select Element Type (not shown) dialog box:
    a.     Select Key Figure with characteristics.
    b.     Choose  .
    On the Element definition: Column 1 dialog box:
    c.     In the Basic Key figure field, use the dropdown to select Amount in company code curr.
    d.     In the Available Characteristics frame, select the desired characteristic for column 1 (for example, Fiscal Year).
    If you want to be prompted for the fiscal year at the time of running the report, you must make this a variable instead of a value.
    e.     Choose  to move the desired characteristic to the selected characteristics frame (for example, Fiscal year).
    f.     Place your cursor in the From value field and select the checkbox to the left under  (variable on/off).
    g.     To view the possible entries for the From field, choose  .
    h.     From the resulting selection dialog box:
    &#61607;     Select a variable from the list of available variables (for example, CYear).
    &#61607;     Choose  .
    i.     On the Element definition dialog box, choose  .
    j.     On the resulting Text maintenance dialog box:
    &#61607;     In Short, enter a text for the column header (for example, Curr Year).
    &#61607;     To copy the short text to Medium and Long text fields, choose the Copy short text button.
    &#61607;     Choose  .
    Now you have defined the column 1 for your report.
    k.     Back on the Element definition dialog box, choose Confirm.
    On the Report Painter: Create Report screen, define column 2 and all other columns you choose to define. You can define these columns either by:
    o     Repeating steps for column 1
    o     Copying columns
    o     Entering a formula that calculates the difference between columns (for example, between Current Year and Prior Year [variable is Pyear] in a column called Variance)
    Adding a column or formula is similar to adding a row formula. After defining the rows and the columns, the screen would appear as follows.
    General Data Selection
    After you define the rows and columns, define the general data selection screen for the report.
    Example Task: Defining the general data selection screen for the report
    1.     On the Report Painter: Create Report screen, from the menu bar, choose Edit &#8594; General data selection.
    2.     On the Element definition: General data selection screen:
    a.     From the Available characteristics frame, select the fields to add to the general data selection as shown.
    b.     Choose  to move the selections into the Selected characteristics frame.
    c.     Enter the values for each field. (For example, the standard ledger for PCA is 8A to 8E and the U.S. company code in IDES is 3000. This example is a year-to-date report, so all 12 periods are in the range. The standard Version in PCA is 0, the Record type for actual dollars is 0, and CO is 2000).
    d.     To check the selections, choose  Check.
    e.     To create the definition for the general data selection for the report, choose Confirm.
          3.   On the Report Painter: Change Report screen:
    a.     To save the report, choose 
    To include the report into a report group, choose Environment &#8594; Assign report group.
          1.     On the Insert Report in Report Group dialog box:
    a.     In Report group, enter a report group name (for example, ZTGR).
    b.     Choose  .
    2.     On the Create report group dialog box, choose Yes to create and assign to a new report group.
    Display and Execute the Report
    Example Task: Displaying the report you created in the previous steps
    1.     On the SAP Easy Access screen, either:
    o     From the navigation menu, choose: SAP menu &#8594; Information systems &#8594; Ad hoc reports &#8594; Report painter &#8594; Report &#8594; Display.
    o     In the Command field, enter transaction GRR3 and choose  .
    2.     On the Report Painter: Display Report screen:
    a.     Double-click on your report.
    b.     Review the report display.
    c.     To execute the report, from the application toolbar, choose execute.
    On the Selection screen:
    a.     Enter the variables used to execute the report (for example, Current Year 2000 and Last Fiscal Year as 1999).
    b.     On the application toolbar, choose execute.
    The report appears. You have successfully created a report in Report Painter.
    You can also execute the report through the report group (for example, ZTGR).
    1.     On the SAP Easy Access screen, choose SAP menu &#8594; Information systems &#8594; Ad hoc reports &#8594; Report Painter &#8594; Report Writer &#8594; Report group &#8594; Execute or in the Command field, enter transaction GR55 and choose 
    2.     On the Execute Report Group: Initial Screen:
    o     In Report Group, use  to select a report group.
    o     Choose  .
    3.     On the next screen, enter appropriate values and choose  .
    4.     On the next screen, from the menu bar, choose:
    o     Settings &#8594; Column attributes to change the column attributes such as changing the column width, setting the scaling factor, and setting decimal place numbering for number display.
    o     Settings &#8594; Summation levels to specify a range of summation levels for which totals will display.
    o     Settings &#8594; Print page format to change the layout of the report output.
    5.     To transfer the report to Microsoft Excel or Lotus 123, from the application toolbar, choose  .
    6.     On the Options dialog box, select the radio button of your choice and choose  . Note that for the report to open in Microsoft Excel or Lotus 123, you need to have these applications installed on your PC.
    7.     To get back to the original display of the report, select Inactive on the Options dialog box.
    Understanding the Report List
    After executing a Report Painter report, several additional functions can be applied to the output to make your reports as meaningful as possible. You can:
    •     Sort on each column.
    •     Highlight rows that meet the threshold criteria, for example any amount greater than 6,000.
    •     Drill down from any line item. Drilling down you can access ABAP programs, transaction codes, SAP Queries, drilldown reports, or other Report Painter and Report Writer reports.
    •     Launch SAP Graphics.
    •     Send the report through SAP mail.
    •     Save as an extract to be brought up later.
    •     Expand and collapse rows.
    •     Change the layout settings.
    •     Display the report in Microsoft Excel with office integration.
    hope this gives you an idea, and send me an email to [email protected] i will send you a doc on it,
    if this was helpful then assign points ..
    regards
    Jay

  • MS Paint for Mac

    Anyone know a third party program that will perform the tasks of MS Paint? Here is the thing.....I use MS Paint for all image editing and graphic design needs. I looked at Paintbrush for Mac and you cannot "free transform" images. Meaning you can't resize by dragging corners of a selected area. Then I tried other programs and you cannot right click a web image and paste it into the workspace. It is very frustrating. I don't need the complexity of Photoshop or GIMP. I am looking for simplicity. I find it hard to believe that no Mac software will allow you to paste a google image into its workspace and resize it by dragging the corners. MS Paint did that with ease. Any suggestions?

    There is an app called, Cross Over, which will allow you to run Windoze apps in OSX. I haven't used it, so I can't comment on its performance. Could be a good option for you though.
    Cross Over: http://www.codeweavers.com/products/

  • When to use Paint over Photoshop?

    Im newer to Photoshop so its easier for me to throw my images into Paint to resize and crop them.
    I was curious if other community members ever use Microsoft Paint for tasks and if so what?
    Also, should I be doing this or would it benefit me to use Photoshop for resizing and croping images?  I plan on using Photoshop but I rarely have it open since I mostly use the development programs within CS5 and it takes magnitudes longer to open Photoshop than Paint.  But even with Fireworks running and the image attended for Fireworks I still through my image into paint because it seems faster.  Am I dumb? Should I give up the paint? Some hot keys for this task probably would be better ahhhh... any insight?
    Thanks,

    I do not think that I have used MS Paint, since about Windows 2.0. I did not even realize that it was still around.
    I just use PS for everything, with the exception of JPEG's, with bum header info, that PS will not open. Then, I just use either ThumbsPlus, or IrfanView, to Open, then Save with proper header info.
    I do not have any data on the Scaling (Resizing) algorithms in Paint, but would think that those in PS would be better. They do offer you a good range of choices, but maybe Paint has similar? Same when Cropping. What part of those operations do you find easier in Paint?
    Though I use PS a lot, and have for a very long time, image editing software is but a tool in a process. Using the right tool, or the one that the artist is most comfortable with, is the trick. I use Painter (now Corel) for a lot of treatments, but almost always finish up in PS. Over the decades, PS has become closer to Painter, than in days past. Still, there are treatments that I want to apply in Painter, and part of those choices will be my personnal comfort level. I might have something very similar in my newer PS, but if I know every step by heart in Painter, my comfort level rises.
    Use what you like for different operations, but I would do a visual check with an operation, like Scale/Resize. Do the same exact operation in each program, using the same base Image, and the same exact settings. Compare the results of the two programs critically.
    Good luck,
    Hunt

Maybe you are looking for