Help using AT NEW, AT END OF

Hi experts,
       I am not able to get desired result by using at new and at end of in my report. This is what i have in my internal table ifinal. fields f2 and f3 are don't care.
f1      f2       f3       f4     f5
a       x        x        10    5
a       x        x        20   15
b       x        x        5     10
b       x        x        10    5
Now i want the result as follows:
f1     f2     f3     f4     f5
a       x     x     10      5
a       x     x     20     15
total  x      x     30     20
b       x     x      5      10
b       x     x     10       5
total   x     x     15     15
so grouping values in f1, i need to calculate total for fields f4 and f5.
Someone plz. help soon.
Thanks.
Abhinav.

Please paste your code here and it will be easy to loo upon.
Here is a pseudo logic.
sort itab1.
loop at itab1.
  write:/ f1, f2, f3, f4, f5.
  at end of f1.
    sum.
    write:/ f1, f4, f5.
  endat.
endloop.
Here are some more details with examples. Please check your code accordingly.
SUM.
You can only use this statement within a LOOP. If you use SUM in an AT - ENDAT block, the system calculates totals for the numeric fields of all lines in the current line group and writes them to the corresponding fields in the work area (see example in ). If you use the SUM statement outside an AT - ENDAT block (single entry processing), the system calculates totals for the numeric fields of all lines of the internal table in each loop pass and writes them to the corresponding fields of the work area. It therefore only makes sense to use the SUM statement in AT...ENDAT blocks.
If the table contains a nested table, you cannot use the SUM statement. Neither can you use it if you are using a field symbol instead of a work area in the LOOP statement.
Examples
Example
DATA: BEGIN OF LINE,
         COL1 TYPE C,
         COL2 TYPE I,
         COL3 TYPE I,
      END OF LINE.
DATA ITAB LIKE HASHED TABLE OF LINE
          WITH UNIQUE KEY COL1 COL2.
LINE-COL1 = 'A'.
DO 3 TIMES.
  LINE-COL2 = SY-INDEX.
  LINE-COL3 = SY-INDEX ** 2.
  INSERT LINE INTO TABLE ITAB.
ENDDO.
LINE-COL1 = 'B'.
DO 3 TIMES.
  LINE-COL2 = 2 * SY-INDEX.
  LINE-COL3 = ( 2 * SY-INDEX ) ** 2.
  INSERT LINE INTO TABLE ITAB.
ENDDO.
SORT ITAB.
LOOP AT ITAB INTO LINE.
  WRITE: / LINE-COL1, LINE-COL2, LINE-COL3.
  AT END OF COL1.
    SUM.
    ULINE.
    WRITE: / LINE-COL1, LINE-COL2, LINE-COL3.
    SKIP.
  ENDAT.
  AT LAST.
    SUM.
    ULINE.
    WRITE: / LINE-COL1, LINE-COL2, LINE-COL3.
  ENDAT.
ENDLOOP.
The output is:
A 1 1
A 2 4
A          3          9
A          6         14
B          2          4
B 4 16
B 6 36
B         12         56
        18         70
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/frameset.htm

Similar Messages

  • Help-- Using GZIPOutputStream, but never end.

    I written serialization object with GZIPOutputStream.
    But recent my Aplication hang 24 hours. I print stack , see the thread is runnable,and lock (0x20fbca10)
    Can any one help me?How the "Deflater.deflateBytes" never end?
    I have two thread.
    thread 1: write serialization object (when receive a message)
    thread 2: close GZip file(when a stop request)
    "RMI TCP Connection(22352)-10.9.146.14" daemon prio=6 tid=0x0792b8d8 nid=0x7b18 runnable [0x4b01d000..0x4b01fa18]
    java.lang.Thread.State: RUNNABLE
         at java.util.zip.Deflater.deflateBytes(Native Method)
         at java.util.zip.Deflater.deflate(Deflater.java:290)
         - locked <0x20fbca10> (a java.util.zip.Deflater)
         at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:159)
         at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)
         at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72)
         - locked <0x1ff90e98> (a java.util.zip.GZIPOutputStream)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
         at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
         - locked <0x1f41f740> (a java.io.BufferedOutputStream)
         at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
    "MessageListenerThread - F_LinkTopic" prio=6 tid=0x05def670 nid=0x16d8 waiting for monitor entry [0x0f90f000..0x0f90fd98]
    java.lang.Thread.State: BLOCKED (on object monitor)
         at java.util.zip.Deflater.deflate(Deflater.java:284)
         - locked <0x20fbca10> (a java.util.zip.Deflater)
         at java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:86)
         at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
         at java.io.FilterOutputStream.close(FilterOutputStream.java:143)

    I have seen an almost identical problem within an Apache CXF web service. In my situation the end of the stack looks almost identical, stuck forever (apparently) inside the native Deflater.deflateBytes.
    In my situation I have seen this with two threads, each independently using GZIPOutputStream.
    I am really starting to think that there is a thread safety issue with the native GZIP code - two independent objects in two threads are simultaneously zipping and both get stuck with 100% CPU utilization in the native code. Interestingly my situation is also in the close processing, but not inside the finish processing. Of all the situations I see with searching for similar situations (search the web for Deflater.java:306) there seems to be a set of common circumstances:
    * Exactly the same last few levels on the stack (ending in Deflater.deflateBytes (Native Method)
    * Two threads interacting with GZIP
    * Often seems to relate to close processing (perhaps a short data remainder problem?)
    My situation is documented here:
    http://www.java.net/forum/topic/glassfish/glassfish/glassfish-301-gzip-problem-threads-apparently-spinning-100-cpu-use
    Salient details of thread dump:
    "http-thread-pool-8080-(18)" - Thread t@950
    java.lang.Thread.State: RUNNABLE
    at java.util.zip.Deflater.deflateBytes(Native Method)
    at java.util.zip.Deflater.deflate(Deflater.java:306)
    - locked <21b0c5> (a java.util.zip.ZStreamRef)
    at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:159)
    at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)
    at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72)
    - locked <132ba84> (a java.util.zip.GZIPOutputStream)
    at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46)
    at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
    at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46)
    at org.apache.cxf.io.AbstractThresholdOutputStream.unBuffer(AbstractThresholdOutputStream.java:89)
    at org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:100)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.AbstractHTTPDestination$BackChannelConduit.close(AbstractHTTPDestination.java:619)

  • Workarea field is changing to ********* when i use at new command

    Hi All,
    I have a workarea. In that work area i have a field (zsample -zbill_zrass). I am using  at new statement.
    My problem is when i debug the code, am able to see that when the control goes inside at new statement, my field (zsample -zbill_zrass). which is holding a number is changing into ***********.  I have attached the code below for your reference.
    Please help me to solve this issue.
    loop at lt_zsample[] into wa_ zsample.
          clear wa_usr_addr.
          read table it_usr_addr into wa_usr_addr
                            with key accnt = zsample -zbill_zrass.
          if sy-subrc = 0.
            CONCATENATE lv_string zsample -zbill_zreff into wa_temp-zbill_zreff
                           SEPARATED BY space.
            wa_temp-zbill_zrass   = zsample -zbill_zrass.
            wa_temp-accnt        = wa_usr_addr-accnt.
            wa_temp-smtp_addr    = wa_usr_addr-smtp_addr.
            lv_temp = lv_string.
            lv_string = wa_temp-zbill_zreff.
            at new zbill_zrass.   -
    >  when control goes inside this (at new ) my problem occurs
              clear lv_string.
              if lt_temp is not initial.
                describe table lt_temp lines lv_line.
                read table lt_temp into wa_temp index lv_line .
                if sy-subrc is initial.
                  wa_temp-zbill_zreff = lv_temp.
                  modify lt_temp index lv_line from wa_temp TRANSPORTING zbill_zreff.
                endif.
                clear wa_temp.
              endif.
              wa_temp-zbill_zreff  = wa_ zsample -zbill_zreff.
              wa_temp-zbill_zrass   = wa_zsample -zbill_zrass.
              wa_temp-accnt        = wa_usr_addr-accnt.
              wa_temp-smtp_addr    = wa_usr_addr-smtp_addr.
              lv_string = wa_temp-zbill_zreff.
              append wa_temp to lt_temp.
              clear wa_temp.
            endat.
          endif.
    clear wa_sample.
    endloop.

    Hi, Mohamed Aslam 
    Suppose you have the following Internal Table.
    Field1 Field2 Field3
    When ever you will use AT NEW, AT END or AT LAST mean any of Control Break Statement one the Field1 you will find all the Fields on the right hand side of that field as *** Stars in it, Suppose if you will use these all on Field2 than Field1 OK Field2 will also be OK but Field3 will again have Stars to over come this you can define a new work are and just before going into these Statement's Blocks assigns the current work area to that one just like the following.
    wa_all_ok = wa_stars.
    than do your processing on that wa_all_ok instead of wa_stars
    Please Reply if any Confusion,
    Best Regards,
    Faisal

  • Hi - just using the new iMovie for the first time - apparently there should be a sidebar containing tools like "Content Library". Not on mine - even in Window view, Content Library features like text etc are all greyed out - obviously it's me - help?

    Hi - just using the new iMovie for the first time - apparently there should be a sidebar containing tools like "Content Library". Not on mine - even in Window view, Content Library features like text etc are all greyed out - obviously it's me - anyone help please?

    Sorry - I should have added that I have imported a Quicktime movie, originally created as an iPhoto slideshow.
    I want to create rolling credits at the movie end and apparently you can only do this using iMovie - can you help please?

  • I created a new apple id for my iphone and ipad which work great and allow me to access Icloud. on my macbook air can't get it to use my new apple id for icloud. Help?

    I created a new apple id for my iphone and ipad which work great and allow me to access Icloud. on my macbook air  I can't get it to use my new apple id for icloud. It keeps going back to my old apple id and doesn't afford me to alter it. I use system preferences-icloud and it just wants to verify the old apple id but doesn't afford me the opportunity to delete teh account or edit it like the iphone5 and ipad. Help?

    Welcome to the Apple Community.
    You need to use the sign out option on the left side.

  • HELP! My old mac was requested to upgrade Firefox to 14.0.1. After the sucessfully installation, I received a message saying my old Mac couldn't use the new Firefox and Safari crashes. I have NO browser now!!!

    My old mac was requested to upgrade Firefox to 14.0.1. After the sucessfully installation, I received a message saying my old Mac couldn't use the new Firefox and Safari crashes. I have NO browser now! Any help would be appreciated.

    Hmmm...  So you upgraded Firefox and now neither Firefox or Safari will work?  Very weird.  I have no idea what might have gone wrong.  That said, when things start acting wierd, I always try a bit of maintenance first.  About 95% of the time, I luck out and it works.
    I use the free program Onyx.  I run all the clean up routines.  Then I boot to the recovery partition (Lion) or the OS X Install Disc and repair permissions and verify/repair the hard disk.
    Hope this helps.

  • I got an iPhone today. The computer that had my iPod music on it is broken. So I am using a new computer. I have both my iPod and iPhone plugged into this computer. How do I make it so my iPod music stays on my iTunes so I can update my iPhone? HELP!

    My computer broke and so I am using a new one to update the music on my iPhone I got today. I can't get my music from my iPod touch (that's plugged in at the same time) to stay on this iTunes. I have already authorized it and everything. I just need to be able to unplug my iPod and plug in my iPhone to get my stinkin music on there. Please help! I'm begging!

    The ipod is not a backup device. The music sync is one way - computer to ipod.  The only exception is itunes purchases:  Without syncing:File>transfer Purchases
    Copy everything from your backup copy of your  old computer to your new one.

  • HT1473 Help I just moved my music files to a external hard drive and am using the new crappy version ( i know my opinion) of itunes and cant add the files to my libray it gives me the add file to library option but not the add folder to library option wha

    Help I just moved my music files to a external hard drive and am using the new crappy version ( i know my opinion) of itunes and cant add the files to my libray it gives me the add file to library option but not the add folder to library option what am i doing wrong?

    In iTunes 11 uncheck the preferences setting in in the iTunes Preferences panel "Advanced > Copy Files to iTunes Media folder when adding to Library"

  • S my computer will on itunes said that it will not use my new ipod touch because it says that service is not started. I have registered my new ipod touch and am trying to download stuff from my itunelibrary. Ps help!

    my computer will on itunes said that it will not use my new ipod touch because it says that service is not started. I have registered my new ipod touch and am trying to download stuff from my itunelibrary. Ps help!

    Try:
    iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

  • How come I can't put music on my ipod? I already have a fair amount of music on my ipod but I have enough space for more. I am using a new computer with itunes and it is telling me if I wasnt to put the new music on my ipd i need to erase my ipod HELP!

    How come I can't put music on my ipod? I already have a fair amount of music on my ipod but I have enough space for more. I am using a new computer with itunes and it is telling me if I wasnt to put the new music on my ipd i need to erase my ipod HELP!

    Because you can only synce with one iTunes library and you are switching libries by using the new computer. To nake this yyour syncing computer:
    - Move all the media(apps, music, synced video and photos etc) to the new computer.
    - Connect the iPofd yo the computer and bake a backup fo the iPod by right clicking on the iPod under Devices in iTunes and select Back Up
    - Restore the iPod from that backup.
    Note that the backup that iTunes makes doe not include media.
    To move mdia to the new computer see:
    iTunes: How to move your music to a new computer
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer

  • Can anyone help me figure out how to use my new LaCie external hard drive to import movies from my camcorder into imovie '09? I ran into so many problems last night!! Was up way past my bedtime!

    Can anyone help me figure out how to use my new LaCie external hard drive to import movies from my camcorder into imovie '09? I ran into so many problems last night!! Was up way past my bedtime!

    I'll stay in this chat ... I answered in the other one ... I have a Sony digital Handycam ... from years ago.  I just got the LaCie and I think I formatted it for only to be used on my Mac ... how should I go about reformatting it to be HFS Extended like you said?

  • Using my new GUI component in an applet :Help!!!

    I am seeking help for the following
    Define class MyColorChooser as a new component so it can be reused in other applications or applets. We want to use the new GUI component as part of an applet that displays the current Color value.
    The following is the code of MyColorChooser class
    * a) We define a class called MyColorChooser that provides three JSlider
    * objects and three JTextField objects. Each JSlider represents the values
    * from 0 to 255 for the red, green and blue parts of a color.
    * We use wred, green and blue values as the arguments to the Color contructeur
    * to create a new Color object.
    * We display the current value of each JSlider in the corresponding JTextField.
    * When the user changes the value of the JSlider, the JTextField(s) should be changed
    * accordingly as weel as the current color.
    * b)Define class MyColorChooser so it can be reused in other applications or applets.
    * Use your new GUI component as part of an applet that displays the current
    * Color value.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    public class MyChooserColor extends JFrame{
         private int red, green, blue;  // color shade for red, green and blue
         private static Color myColor;  // color resultant from red, green and blue shades
         private JSlider mySlider [];      
         private JTextField textField [];
    // Panels for sliders, textfields and button components
         private JPanel mySliderPanel, textFieldPanel, buttonPanel;
    // sublcass objet of JPanel for drawing purposes
         private CustomPanel myPanel;
         private JButton okButton, exitButton;
         public MyChooserColor ()     
              super( "HOME MADE COLOR COMPONENT; composition of RGB values " );
    //       setting properties of the mySlider array and registering the events
              mySlider = new JSlider [3];
              ChangeHandler handler = new ChangeHandler();
              for (int i = 0; i < mySlider.length; i++)
              {     mySlider[i] = new JSlider( SwingConstants.HORIZONTAL,
                               0, 255, 255 );
                   mySlider.setMajorTickSpacing( 10 );
                   mySlider[i].setPaintTicks( true );
    //      register events for mySlider[i]
                   mySlider[i].addChangeListener( handler);                     
    //      setting properties of the textField array           
              textField = new JTextField [3];          
              for (int i = 0; i < textField.length; i++)
              {     textField[i] = new JTextField("100.00%", 5 );
                   textField[i].setEditable(false);
                   textField[i].setBackground(Color.white);
    // initial Background color of each slider and foreground for each textfield
    // accordingly to its current color shade
              mySlider[0].setBackground(
                        new Color ( mySlider[0].getValue(), 0, 0 ) );
              textField[0].setForeground(
                        new Color ( mySlider[0].getValue(), 0, 0 ) );           
              mySlider[1].setBackground(
                        new Color ( 0, mySlider[1].getValue(), 0 ) );
              textField[1].setForeground(
                        new Color ( 0, mySlider[1].getValue(), 0 ) );
              mySlider[2].setBackground(
                        new Color ( 0, 0, mySlider[2].getValue() ) );
              textField[2].setForeground(
                        new Color ( 0, 0, mySlider[2].getValue() ) );
    // initialize myColor to white
              myColor = Color.WHITE;
    // instanciate myPanel for drawing purposes          
              myPanel = new CustomPanel();
              myPanel.setBackground(myColor);
    // instanciate okButton with its inanymous class
    // to handle its related events
              okButton = new JButton ("OK");
              okButton.setToolTipText("To confirm the current color");
              okButton.setMnemonic('o');
              okButton.addActionListener(
                   new ActionListener(){
                        public void actionPerformed (ActionEvent e)
                        {     // code permetting to transfer
                             // the current color to the parent
                             // component backgroung color
                             //System.exit( 0 );     
    //      instanciate exitButton with its inanymous class
    //      to handle its related events           
              exitButton = new JButton("Exit");
              exitButton.setToolTipText("Exit the application");
              exitButton.setMnemonic('x');
              exitButton.addActionListener(
                        new ActionListener(){
                             public void actionPerformed (ActionEvent e)
                             {     System.exit( 0 );     
    // define the contentPane
              Container c = getContentPane();
              c.setLayout( new BorderLayout() );
    //     panel as container for sliders
              mySliderPanel = new JPanel(new BorderLayout());
    //      panel as container for textFields           
              textFieldPanel = new JPanel(new FlowLayout());
    //      panel as container for Jbuttons components           
              buttonPanel = new JPanel ();
              buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.Y_AXIS ) );
    //add the Jbutton components to buttonPanel           
              buttonPanel.add(okButton);
              buttonPanel.add(exitButton);
    //     add the mySlider components to mySliderPanel
              mySliderPanel.add(mySlider[0], BorderLayout.NORTH);
              mySliderPanel.add(mySlider[1], BorderLayout.CENTER);
              mySliderPanel.add(mySlider[2], BorderLayout.SOUTH);
    //add the textField components to textFieldPanel     
              for (int i = 0; i < textField.length; i++){
                   textFieldPanel.add(textField[i]);
    // add the panels to the container c          
              c.add( mySliderPanel, BorderLayout.NORTH );
              c.add( buttonPanel, BorderLayout.WEST);
              c.add( textFieldPanel, BorderLayout.SOUTH);
              c.add( myPanel, BorderLayout.CENTER );
              setSize(500, 300);          
              show();               
    //     inner class for mySlider events handling
         private class ChangeHandler implements ChangeListener {          
              public void stateChanged( ChangeEvent e )
    // start by collecting the current color shade
    // for red , forgreen and for blue               
                   setRedColor(mySlider[0].getValue());
                   setGreenColor(mySlider[1].getValue());
                   setBlueColor(mySlider[2].getValue());
    //The textcolor in myPanel (subclass of JPanel for drawing purposes)
                   myPanel.setMyTextColor( ( 255 - getRedColor() ),
                             ( 255 - getGreenColor() ), ( 255 - getBlueColor() ) );
    //call to repaint() occurs here
                   myPanel.setThumbSlider1( getRedColor() );
                   myPanel.setThumbSlider2( getGreenColor() );
                   myPanel.setThumbSlider3( getBlueColor() );
    // display color value in the textFields (%)
                   DecimalFormat twoDigits = new DecimalFormat ("0.00");
                   for (int i = 0; i < textField.length; i++){
                        textField[i].setText("" + twoDigits.format(
                                  100.0* mySlider[i].getValue()/255) + " %") ;
    // seting the textcolor for each textField
    // and the background color for each slider               
                   textField[0].setForeground(
                             new Color ( getRedColor(), 0, 0 ) );
                   mySlider[0].setBackground(
                             new Color ( getRedColor(), 0, 0) );
                   textField[1].setForeground(
                             new Color ( 0, getGreenColor() , 0 ) );
                   mySlider[1].setBackground(
                             new Color ( 0, getGreenColor(), 0) );
                   textField[2].setForeground(
                             new Color ( 0, 0, getBlueColor() ) );
                   mySlider[2].setBackground(
                             new Color ( 0, 0, getBlueColor() ) );
    // color of myPanel background
                   myColor = new Color (getRedColor(),
                             getGreenColor(), getBlueColor());
                   myPanel.setBackground(myColor);               
    // set methods to set the basic color shade
         private void setRedColor (int r){
              red = ( (r >= 0 && r <= 255) ? r : 255 );
         private void setGreenColor (int g){
              green = ( (g >= 0 && g <= 255) ? g : 255 );
         private void setBlueColor (int b){
              blue = ( (b >= 0 && b <= 255) ? b : 255 );
    // get methods (return the basic color shade)
         private int getRedColor (){
              return red ;
         private int getGreenColor (){
              return green;
         private int getBlueColor (){
              return blue;
         public static Color getMyColor (){
              return myColor;
    // main method                
         public static void main (String args []){
              MyChooserColor app = new MyChooserColor();
              app.addWindowListener(
                        new WindowAdapter() {
                             public void windowClosing( WindowEvent e )
                             {     System.exit( 0 );
    // inner class CustomPanel for drawing purposes
         private class CustomPanel extends JPanel {
              private int thumbSlider1 = 255;
              private int thumbSlider2 = 255;
              private int thumbSlider3 = 255;
              private Color myTextColor;
              public void paintComponent( Graphics g )
                   super.paintComponent( g );
                   g.setColor(myTextColor);
                   g.setFont( new Font( "Serif", Font.TRUETYPE_FONT, 12 ) );
                   DecimalFormat twoDigits = new DecimalFormat ("0.00");
                   g.drawString( "The RGB values of the current color are : "
                             + "( "     + thumbSlider1 + " , " + thumbSlider2 + " , "
                             + thumbSlider3 + " )", 10, 40);
                   g.drawString( "The current background color is composed by " +
                             "the folllowing RGB colors " , 10, 60);
                   g.drawString( "Percentage of RED from slider1 : "
                        + twoDigits.format(thumbSlider1*100.0/255), 10, 80 );
                   g.drawString( "Percentage of GREEN from slider2 : "
                        + twoDigits.format(thumbSlider2*100.0/255), 10, 100 );
                   g.drawString( "Percentage of BLUE from slider3 : "
                        + twoDigits.format(thumbSlider3*100.0/255), 10, 120 );
    // call to repaint occurs here     
              public void setThumbSlider1(int th){
                   thumbSlider1 = (th >= 0 ? th: 255 );
                   repaint();
              public void setThumbSlider2(int th){
                   thumbSlider2 = (th >= 0 ? th: 255 );
                   repaint();
              public void setThumbSlider3(int th){
                   thumbSlider3 = (th >= 0 ? th: 255 );
                   repaint();
              public void setMyTextColor(int r, int g, int b){
                   myTextColor = new Color(r, g, b);
                   repaint();
    //The following method is used by layout managers
              public Dimension getPreferredSize()
              {     return new Dimension( 150, 100 );
    The following is the code of application that tests the component
    //Application used to demonstrating
    // the homemade GUI MyChooserColor component
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class ShowMyColor extends JFrame {
         private JButton changeColor;
         private Color color = Color.lightGray;
         private Container c;
         MyChooserColor colorComponent;
         public ShowMyColor()
         {     super( "Using MyChooserColor" );
              c = getContentPane();
              c.setLayout( new FlowLayout() );
              changeColor = new JButton( "Change Color" );
              changeColor.addActionListener(
                        new ActionListener() {
                             public void actionPerformed( ActionEvent e )
                             {     colorComponent = new MyChooserColor ();
                                  colorComponent.show();
                                  color = MyChooserColor.getMyColor();
                                  if ( color == null )
                                       color = Color.lightGray;
                                  c.setBackground( color );
                                  c.repaint();
              c.add( changeColor );
              setSize( 400, 130 );
              show();
         public static void main( String args[] )
         {     ShowMyColor app = new ShowMyColor();
              app.addWindowListener(
                        new WindowAdapter() {
                             public void windowClosing( WindowEvent e )
                             {  System.exit( 0 );

    Yes, I want help for the missing code to add in actionPerformed method below. As a result, when you confirm the selected color (clicking the OK button), it will be transferred to a variable color of class ShowMyColor.
    // instanciate okButton with its inanymous class
    // to handle its related events
              okButton = new JButton ("OK");
              okButton.setToolTipText("To confirm the current color");
              okButton.setMnemonic('o');
              okButton.addActionListener(
                   new ActionListener(){
                        public void actionPerformed (ActionEvent e)
                        {     // code permetting to transfer
                             // the current color to the parent
                             // component backgroung color
                             //System.exit( 0 );     
              );

  • HT4623 After i updated my iPhone i realized i do not have my camera anymore how to get it back? I also using a new notebook so I do not have a back up to transfer it from.  Please help

    After i updated my iPhone i realized i do not have my camera anymore how to get it back? I also using a new notebook so I do not have a back up to transfer it from.  Please help

    I'm assuming you mean you don't have your camera application (which is not saved on any backup anyway).
    One way to find it is to get to your home screen, swipe the screen from right to left, and type "Camera" in the search field.  Camera is a core Apple app and cannot be deleted, so it must be there somewhere.
    An alternate approach is to do Settings > General > Reset > Reset Home Screen Layout

  • I can't view old iphoto libraries. It wants me to use a new version of iphoto but from all the commits here, no one likes it. Help! how do i get to my old libraries???

    I can't view old iphoto libraries. It wants me to use a new version of iphoto but from all the commits here, no one likes it. Help! how do i get to my old libraries???

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    what do you see when iPhoto opens?
    what fixes have you tried?
    where is you library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?
    OT

  • Help?  I keep getting "Unexpected Error" everytime I try to use my new Airport Express to extend my network from my 500GB Time Capsule.

    I am trying to extend my network from my 500GB Time Capsule using the new Airport Express I just bought, but no matter what I try I keep getting "Unexpected Error.  Try again".  The Express is still flashing Amber.  I cannot get it to turn green.  What am I doing wrong here?  Please help me.

    Locate the AirPort Express in the same room as the Time Capsule for the setup.
    Power off and restart the Time Capsule
    Shut down and restart the Mac. Turn on the wireless on the Mac and temporarily disconnect the Ethernet cable from the Mac to the AirPort Express. In other words, you want to set up the AirPort Express using wireless, since that is the way that it will be used.
    Hold in the reset button on the AirPort Express for 9-10 seconds and release. Allow a full minute for the Express to restart.
    Click the AirPort icon at the top of the Mac's screen and wait a few seconds for a listing of New AirPort Base Station to appear. Just below that, click directly on AirPort Express.
    AirPort Setup will open up and take a minute to analyze the network, then announce that the Express will be configured to extend the Time Capsule network.
    Enter a device name that you want to use and click Next
    Wait a minute while AirPort Setup configures everything, and hopefully announces a message of Setup Complete. Click Done.
    Now move the AirPort Express to a location that is about half way between the Time Capsule and the area that needs more wireless coverage. Avoid obstructions in the signal path between the Time Capsule and AirPort Express as much as possible. 
    Walls, ceilings, mirrors, heavy furniture, etc. just kill the wireless signal quality. Keep any cordless phones as far away from either router as possible.
    It would be much better if you could plan to connect the Time Capsule and AirPort Express using an Ethernet cable, as best case.....you will be losing about half of the network speed trying to use wireless to extend.

Maybe you are looking for

  • Lightroom 4 camera raw plugin 7.4 install questions

    I have Lightroon 4 and CS4, When I right click to edit in CS4 I get a dialog box that says "This version of lightroom may require the Photoshop camera RAW plug-in version 7.4 for full compatibility. Any help?

  • Importing Microsoft Word doc to InDesign with embedded EPS art ~ scaling issue

    Hi, my workflow calls for creating content in Microsoft Word 2010 with embedded EPS art, in this case MathType 6.7a math objects. When I import these manuscripts (after saving as Word 97/2003 format) into my Adobe InDesign CS5.5 templates, the embedd

  • Edit XML payload of messages before restart

    Is there a way to edit the payload of a message before to restart it? I allway get the following message: "you can only edit header/body parts" Thanks, Laurent

  • Project Management using Solution Manager

    Hi, We are trying to use solution Manager for managing our IT projects - specifically for SAP projects. We browsed through the existing functionalities that are available and are not able to get info on the following: ___Project Admin tab for Roadmap

  • AXLToolkit question or how I can extract IPPHONES info from CUCM6

    I have downloaded AXLToolkit, now I run C:\axlsqltoolkit>java -cp .\classes;.\lib\saaj-api.jar;.\lib\saaj-impl.jar;.\lib \mail.jar;.\lib\activation.jar;.\lib\jaxm-api.jar;.\lib\jaxm-runtime.jar;.\lib\x ercesImpl.jar;.\lib\xml-apis.jar AxlSqlToolkit -