Programming 2D graphics

Hi, I would like to write some C/C++ programs to demonstrate math and physics equations for a course that I am teaching. I would like to do this in C++ (rather than a higher level language) because I already know C++ and the students are using C++ for their assignments, so it is easier to give them bits of code.
What I am looking for is:
- open a window
- draw a pixel in some colour
- draw a line
I have the developer CD installed, but admittedly, haven't tried compiling and running the various examples.
Any advice is appreciated.
Thanks,
Stan

What graphics library are you looking to use? OpenGL is probably the best around. Its mainly used for 3D rendering, so its probably not what you are loking for. The easiest library is probably SDL. Its very simple and not much to it. I have a little experiance with it, as I'm learning OpenGL myself, but form what I have used its quite easy. I would say for what you are looking todo SDL is the way to go.
Here's the official sites of each:
• OpenGL - www.opengl.org
• SDL - www.libsdl.org
BTW, did I mention both are cross-platform.
Hope that helps

Similar Messages

  • How to program different graphical interface in a labview

    Hi
     i  adding different graphical inface in labview,by taking tab control in that add menu,go-online, and some function,i did this for touch screen by clicking it go on linking..I attached this i, already did  some partr in labview.I also attached ms_Paper prasentation refference  i doing this,give me the solltion how to link these slides in labview
    Attachments:
    temlate.vi ‏21 KB

    Sham,
    If English is your second language you might want to post on another forum.  I am really not sure what you are trying to do but you are telling us, "give me the sollition how to link these slides in labview"  so I'll attach a community example you may want to look at. 
    https://decibel.ni.com/content/docs/DOC-34150
    Also, if you are going to attach code, please do something in the block diagram.  I have almost no idea what you want to do and opening the VI did not help at all.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • Looking for Java Based Graphics & Animation Program

    I'm having a bit of trouble finding a Java based program for graphics such as in games, pictures, etc. I already have Sun Java Studio Creator 2 which seems to be all about website graphics, and not what I'm looking for. Can anyone help me out?
    Edited by: Daniel517 on Nov 18, 2007 11:59 AM

    search for Multimedia, Java2D, Java3D, JAI topics
    http://forum.java.sun.com/category.jspa?categoryID=9
    http://forum.java.sun.com/forum.jspa?forumID=406
    http://jalbum.net/
    Edited by: RyanRM on Nov 18, 2007 8:16 PM

  • One program for pc and mac with different imports

    I am trying to port my Java program from the PC to the MAC. I would like to have one program that works on both, the PC and the MAC. So I am using the
    if (System.getProperty("mrj.version") == null) //PC
    else //MAC
    condition to see if I am on the PC or MAC for making sure that the About menu is at the Help menu on top of the application window (PC) or at the Program menu on top of the screen (MAC) and the Control key (PC) or Command key (MAC) is used.
    However, the Mac also uses additional imports, such as
    import com.apple.laf.*;
    import com.apple.mrj.*;
    import com.apple.eawt.*;
    I cannot make an if statement before the imports. How can I make sure that the imports are only used on the MAC?
    Thanks for your time!

    >
    ..my program has a GUI...>Cool. OK - if you have not tried applications launched by JWS (Java Web Start) it is usually handy to get a feel for how they work for the end user. The biggest difference is between sandboxed applications, and ones that request extended permissions in the form of either j2ee-application-client-permissions or all-permissions. The first removes the warning banner from the bottom of windows, and adds a few other allowable actions, while the latter is, as it implies - all permissions.
    Examples of all-permissions/sandboxed can be seen in this [demo of the JNLP fileservice|http://pscode.org/jws/api.html#fs].
    >
    .. It is a computer graphics program, and it has a Tools palette where you can specify what and how you want to draw or select or move, and it has a Measurements palette, where you can use numbers for your drawing.>Does it offer to export the resulting graphics (e.g. save them to disk)? Does the program load graphic objects from disk? The reason I pointed to a demo of the differences between sand boxed and trusted apps., is because if the app. wants to 'access the local disks' it will either need to request all-permissions or as demonstrated in the example, use the [JNLP API|http://java.sun.com/javase/6/docs/jre/api/javaws/jnlp/index.html] (a group of classes only available to apps. launched by webstart) to do common things like access disks or printer, or take control of downloads...
    If you click the [Launch File Service (sandboxed) demo|http://pscode.org/jws/filetest-sandbox.jnlp] link, you can see what the experience would be like for the end user if the app. were converted to use the JNLP API for file I/O and was delivered entirely sandboxed.
    Of course, if your app. could work entirely sand boxed, like an applet - no code signing or extra permissions would be necessary, but that is uncommon for a desktop application.
    >
    So could you please give me some explanation or reference how to do launching it using webstart, and putting the mac specific resources into a resource section flagged for the Mac? >Launching an app. via webstart is not entirely 'simple', especially if you are new to it. OTOH it is well worth the effort - for the sake of the end user.
    The very basics of webstart is that you create a JNLP file to launch the app., I guess it is similar to the Mac .plist (or whatever they are) that you are discussing in another thread. Java JNLP files are a form of XML. Here is an example of what one might look like for an app. that provides different resources to different OS.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0"
          codebase="http://ananya.com/lib"
          href="ananyacurves.jnlp">
      <information>
        <title>Ananya Curves</title>
        <vendor>Ananya Systems</vendor>
        <description>Ananya Curves - Computer Graphics</description>
        <offline-allowed/>
        <shortcut online="false">
          <desktop/>
          <menu submenu="AnanyaSystems"/>
        </shortcut>
      </information>
      <security>
           <all-permissions />
      </security>
        <resources>
          <j2se version="1.6+" />
          <jar href="AnanyaCurves.jar" main='true' />
        </resources>
        <!-- This is it! Supply the mac specific classes ONLY to Macintosh OS. -->
        <resources os='Mac'>
          <jar href="mac-specific.jar" />
        </resources>
      <application-desc />
    </jnlp>
    >
    ..Well, I am a complete beginner at this.>It can be a steep learning curve to first use JWS successfully, but it is well worth it.
    There is a good [overview of webstart|http://java.sun.com/developer/technicalArticles/Programming/jnlp/], but I also find it handy to keep the documentation on the [JNLP file syntax|http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html] nearby.
    Unfortunately many IDEs (and people) are not that competent at writing JNLP files, so I provide a JNLP XSD and [YAX-V|http://pscode.org/xml/xmltools.html#yaxv] to validate them.

  • Looking for simple graphics editor

    PHOTOSHOP (even elements) is way too complicated for little old me -
    can anyone recommend a simple program - a graphics editor - the main thing I need to do is place a piece of text over an existing image.
    is there a little apple applet that does something like that?
    or something low-cost at the App store?
    w
    PS: am running Mavericks & looking forward to Yosemite, Sam!

    no kidding! I always use PREVIEW to view files, I had no idea that it could actually edit them.  thanks! will try immediately!
    w

  • 2 Problems w/ 2 Programs

    // Mortgage Program w/ graphical interface & set year and rate inputs
    // By : 2/05
    import javax.swing.*;
    import java.awt.*;
    public class MortgageGui2 extends JFrame {
    MortgageGui2Support mortgageSupport = new MortgageGui2Support(this);
    // Row 1
    JPanel row1 = new JPanel();
    JLabel Amount = new JLabel("Amount $", JLabel.LEFT);
    JTextField txtAmount = new JTextField(10);
    JLabel Selection = new JLabel("Select Term/Rate", JLabel.LEFT);
    JLabel Payment = new JLabel ("Monthly Payment is:");
    JTextField paymentValueBox = new JTextField (10);
    JComboBox comboTermInterest = new JComboBox();
    // Row2
    JPanel row2 = new JPanel();
    JLabel Month = new JLabel("\nPayment", JLabel.LEFT);
    JLabel IntBalance = new JLabel("Interest Paid", JLabel.CENTER);
    JLabel Remaining = new JLabel("Balance", JLabel.RIGHT);
    // Row 3
    JPanel row3 = new JPanel();
    JTextArea txtResults = new JTextArea(10, 35);
    // Row 4
    JPanel row4 = new JPanel();
    JButton calculateButton = new JButton("Calculate");
    JButton clearButton = new JButton("Reset");
    JButton exitButton = new JButton("Exit");
    public MortgageGui2() {
         super("Mortgage Calculator Week 2");
         setSize(655, 350);
         setLocation(250, 60);
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         FlowLayout layout = new FlowLayout();
         Container pane = getContentPane();
         pane.setLayout(layout);
         // Buttons
         calculateButton.addActionListener(mortgageSupport);
         clearButton.addActionListener(mortgageSupport);
         comboTermInterest.addItemListener(mortgageSupport);
         exitButton.addActionListener(mortgageSupport);
         // Row 1
         FlowLayout flow1 = new FlowLayout();
         row1.setLayout(flow1);
         row1.add(Amount);
         row1.add(txtAmount);
         row1.add(Selection);
         row1.add(comboTermInterest);
         comboTermInterest.setEnabled(true);
         comboTermInterest.addItem(" Choose One ");
         comboTermInterest.addItem("7 years at 5.35% ");
         comboTermInterest.addItem("15 years at 5.5% ");
         comboTermInterest.addItem("30 years at 5.75% ");
         row1.add (Payment);
         row1.add (paymentValueBox);
         pane.add(row1);
         // Row 2
         GridLayout flow2 = new GridLayout(1, 4, 5, 1);
         row2.setLayout(flow2);
         row2.add(Month);
         row2.add(IntBalance);
         row2.add(Remaining);
         pane.add(row2);
         // Row 3
         txtResults.setLineWrap(true);
         JScrollPane textPane = new JScrollPane(txtResults,
              JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
              JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         row3.add(textPane);
         pane.add(row3);
         // Row 4
         GridLayout flow5 = new GridLayout (1,5,85,1);
         row4.setLayout(flow5);
         row4.add(calculateButton);
         calculateButton.setEnabled(false);
         row4.add(clearButton);
         clearButton.setEnabled(false);
         row4.add(exitButton);
         pane.add(row4);
    public static void main(String[] args) {
         MortgageGui2 guiFrame = new MortgageGui2();
         guiFrame.setVisible(true);
    // Support section of program.
    import java.text.NumberFormat;
    import java.awt.event.*;
    import java.math.*;
    public class MortgageGui2Support implements ItemListener, ActionListener {
         MortgageGui2 gui;
         int array;
         double [] arrayMonths = {0,84,180,360};
         int c = 1;
         double [] arrayInterest = {0,5.35,5.5,5.75};
         int i = 1;
              public MortgageGui2Support (MortgageGui2 in) {
                   gui = in;
    public static void main(String[] arguments) {
    public void itemStateChanged(ItemEvent arg0) {
         Object button = gui.comboTermInterest.getSelectedItem();
         String buttonPress = button.toString();
              if (buttonPress == "7 years at 5.35% ") {
                   array = 1;
                   gui.calculateButton.setEnabled(true);
                   gui.clearButton.setEnabled(true);
              if (buttonPress == "15 years at 5.5% ") {
                   array = 2;
                   gui.calculateButton.setEnabled(true);
                   gui.clearButton.setEnabled(true);
              if (buttonPress == "30 years at 5.75% ") {
                   array = 3;
                   gui.calculateButton.setEnabled(true);
                   gui.clearButton.setEnabled(true);
    public void actionPerformed(ActionEvent event) {
         String buttonClicked = event.getActionCommand();
              if (buttonClicked == "Calculate") {
                   clearResults();
                   funcCalculate();
              if (buttonClicked == "Reset")
                   setNull();
              if (buttonClicked == "Exit")
                   System.exit(0);
         void funcCalculate()     {
              do {
                   NumberFormat fmt = NumberFormat.getInstance();
                   fmt.setGroupingUsed (true);
                   fmt.setMaximumFractionDigits(2);
                   fmt.setMinimumFractionDigits(2);
                   String txtInitialAmount = gui.txtAmount.getText();
                   gui.comboTermInterest.setEnabled(true);
                   gui.calculateButton.setEnabled(true);
                   // Calculations
                   double initBalance = Double.parseDouble(txtInitialAmount);
                   double loanRateMonth = (arrayInterest[array] / 1200);
                   for(int i = 1; i <= arrayMonths[array]; i++) {
                        double monthInterest = arrayInterest[array] / (1200);
                        double monthPayment = (initBalance *( loanRateMonth) / (1 -(1/ Math.pow((1 + loanRateMonth),( arrayMonths[array])))));
                        double Interest = (initBalance * monthInterest);
                        double totalamount = (Interest + initBalance);
                        double remaining = (totalamount - monthPayment);
                        initBalance = (totalamount - monthPayment);
                        // Output
                        gui.txtResults.append("\t " + i + "\t$"
                             + fmt.format (Interest) + "\t$"
                             + fmt.format (remaining) + "\t\n");
                             c++;
              } while (c <= arrayMonths[array]);
         void setNull() {
              gui.txtAmount.setText (null);
              gui.comboTermInterest.setSelectedItem("Select Option");
              gui.txtResults.setText(null);
              i = 1;
         void clearResults() {
              gui.txtResults.setText(null);
    These two programs work together and I am getting the wrong balance in the output and I need to know how to input the monthly mortgage output to the box at the end of line 1. Thanks

    I didn't go thru all of it, but these things are common mistakes:
    if (buttonPress == "7 years at 5.35% ")Always use the String.equals method to compare, not the == operator, which only compares object references, not values.
    You really should only post specific questions, not whole progs with the "question" basically "please fix it for me".

  • Modlue programming guide!

    Need some help in module pool programming guide !

    Hi,
    MODULE POOL PROGRAMMING (MPP):
    These are type M programs in SAP.
    These programs cannot be executed directly.
    Transaction Codes (Tcodes) are used to execute MPP programs.
    Graphical Screen PAinter is the tool used to create GUI in MPP (SE51).
    MPP programs are created using the transaction code SE80.
    MPP programs should start with the naming convention SAPMZ or SAPMY.
    EVENTS ASSOCIATED WITH SELECTION-SCREEN:
    INITIALIZATION
    AT SELECTION-SCREEN
    START-OF-SELECTION
    TOP-OF-PAGE
    END-OF-PAGE
    END-OF-SELECTION.
    EVENTS ASSOCIATED WITH MPP:
    1. PROCESS BEFORE OUTPUT (PBO) - Used to specify initial attributes for the screen.
    2. PROCESS AFTER INPUT (PAI) - Used to specify
    event functionalities for the components of the screen.
    COMPONENTS OF MPP PROGRAM:
    1. ATTRIBUTES - It holds description about the screen.
    2. FLOW LOGIC - This is an editor for MPP programs to specify event functionality for the screen components.
    3. ELEMENT LIST - This provides description about the components created in the screen.
    TYPES OF SCREEN IN MPP:
    1. NORMAL SCREEN - A screen which has maximizing, minimizing and closing options
    is referred to as normal screen.
    2. SUBSCREEN - A screen within a normal screen with either of above three options
    is referred to as subscreen.
    3. MODAL DIALOG BOX - A screen with only closing option which is used to provide
    information to the end user is referred to as modal dialog box.
    NAVIGATIONS TO CREATE A SIMPLE MPP PROGRAM:
    SE80 -> Select Program from the dropdown list -> SPecify program name starting with SAPMZ or SAPMY (eg. SAPMYFIRSTMPP) -> Press Enter -> Click on Yes to Create object -> Opens another dialog box -> Click on Continue to create Top Include File for the program -> Opens another dialog box specifying TOP INCLUDE FILE name (MYFIRSTMPPTOP) -> Click on Continue -> Opens Program Attributes screen -> Enter short description -> The default program type is M -> Save under a package -> Assign Request number -> A folder with specified program name(SAPMYFIRSTMPP) is created with Top Include File.
    To create a screen, right click on program name -> Create -> SCreen -> Opens dialog box
    -> Specify Screen number (100) -> Continue -> Opens an interface -> Enter short description
    -> Select Screen type as Normal -> Click on LAYOUT pushbutton from appn. toolbar
    -> Opens Graphical Screen painter -> Drag and drop two input fields, two pushbuttons and
    two text fields -> Double click on each component to specify attributes as follows:
    INPUT FIELDS: IO1, IO2
    FIRST PUSHBUTTON : PB1, PRINT, PRINT
    SECOND PUSHBUTTON : PB2, EXIT, EXIT
    TEXT FIELDS : LB1 (ENTER NAME), LB2 (ENTER CITY)
    -> Save -> Click on Flowlogic Pushbutton from appn. toolbar -> Opens Flow Logic editor
    with two events (PA1 and PBO).
    To specify event functionalities for screen components,
    decomment PAI Module name (USER_COMMAND_0100)
    -> Double click on module name -> Click on Yes to create object -> Opens an interface
    -> Select Program name from the list -> Continue -> Click on Yes to save the editor
    -> Opens PAI module and specify following code:
    CASE SY-UCOMM.
    WHEN 'PRINT'.
    LEAVE TO LIST-PROCESSING.
    WRITE :/ IO1, IO2.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    In TOP INCLUDE FILE, declare input fields as follows:
    DATA : IO1(20), IO2(20).
    Save -> Activate -> Right click on Program name -> Activate (to activate all inactive objects).
    To execute MPP program, right click on program name -> Create -> Transaction
    -> Opens an interface -> Specify Tcode starting with Z or Y (zfirstmpp) -> Enter short description -> Continue -> Specify Main program name (SAPMYFIRSTMPP) and initial Screen number (100) -> Save under a package -> Assign a request number -> Execute.
    TOP INCLUDE FILE is an area to declare variables for the program, and the variables declared here becomes globally accessed.
    SCREEN VALIDATION USING MPP:
    SCREEN is a predefined structure used to make MPP screen validations dynamically. SCREEN has following components:
    GROUP1
    INVISIBLE
    REQUIRED
    INPUT
    OUTPUT
    INTENSIFIED
    IF SCREEN-INVISIBLE = 0 - Sets the input field values as visible.
       SCREEN-INVISIBLE = 1 - Sets the input field as password field.
       SCREEN-REQUIRED = 0 - Not a mandatory field.
       SCREEN-REQUIRED = 1 - Sets input field as mandatory one.
    Eg. code to perform validation dynamically for a login screen:
    1. Create an MPP program.
    2. Create a Normal Screen like initial login screen.
    3. Assign IO1, IO2 to group GR1, IO3 to GR2.
    4. In Top Include file, declare variables.
    5. In PBO, specify following code:
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'GR1'.
    SCREEN-REQUIRED = '1'.
    ENDIF.
    IF SCREEN-GROUP1 = 'GR2'.
    SCREEN-INVISIBLE = '1'.
    ENDIF.
    MODIFY SCREEN.  * to update the changes made to the predefined             structure.
    ENDLOOP.
    6. In PAI, specify following code:
    CASE SY-UCOMM.
    WHEN 'LOGIN'.
    CALL TRANSACTION 'SE38'.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    7. Create a Tcode -> Activate all -> Execute.
    INSERTING RECORDS FROM MPP SCREEN INTO DATABASE TABLE:
    1. Create an MPP program.
    2. In Top Include File, declare an internal table as follows:
         DATA IT_KNA1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    -> Save -> Activate.
    3. Create a screen -> In Screen Painter, click DICTIONARY/PROGRAM FIELDS (F6)
    pushbutton from appn. toolbar -> Opens an interface
    -> Specify internal table name -> Click on GET FROM PROGRAM pushbutton
    -> Select required fields -> Continue -> Paste on Screen Painter
    -> Create two pushbuttons (INSERT, EXIT) -> Save -> Flow logic.
    4. In PAI, specify following code:
    CASE SY-UCOMM.
    WHEN 'INSERT'.
    INSERT INTO KNA1 VALUES IT_KNA1.
    IF SY-SUBRC = 0.
    MESSAGE S000(ZMSG).
    ELSE.
    MESSAGE W001(ZMSG).
    ENDIF.
    WHEN 'EXIT'.
    *LEAVE PROGRAM.
    SET SCREEN 0.
    ENDCASE.
    5. Create a Tcode -> Activate all -> Execute.
    LIST OF VALUES:
    Adding dropdown facility to the input fields is called as LIST OF VALUES.
    VRM is a predefined type group which has the following structure and internal table:
    VRM_VALUE is a structure with the components KEY and TEXT.
    VRM_VALUES is an internal table declared for the above structure without header line.
    The above type group is used to fetch values from the internal table declared with user-defined records and insert into the input field in the screen.
    'VRM_SET_VALUES' is a function module used to carry the records from the internal table and populate in the input field.
    NAVIGATIONS TO CREATE DROPDOWN FACILITY FOR INPUT BOX:
    1. Create MPP program.
    2. Create a screen.
    3. Add a input box -> Double click -> Specify name (IO1) -> Select LISTBOX from the dropdown list -> A dropdown facility is added for the input field in the screen.
    4. Create two pushbuttons (PRINT, EXIT).
    5. In Top Include File, specify following code:
    TYPE-POOLS VRM.
    DATA IO1(20).
    DATA A TYPE I.
    DATA ITAB TYPE VRM_VALUES. * To create an internal table of an existing type
    DATA WA LIKE LINE OF ITAB. * To create a temporary structure of sameline type of internal table.
    6. In PBO, specify following code:
    IF A = 0.
    WA-KEY = 'ABAP'.
    WA-TEXT = 'ADVANCED PROGRAMMING'.
    APPEND WA TO ITAB.
    WA-KEY = 'BW'.
    WA-TEXT = 'BUSINESS WAREHOUSING'.
    APPEND WA TO ITAB.
    WA-KEY = 'EP'.
    WA-TEXT = 'ENTERPRISE PORTAL'.
    APPEND WA TO ITAB.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    =  'IO1'
        VALUES                =   ITAB.
    A = 1.
    ENDIF.
    7. In PAI, specify following:
    CASE SY-UCOMM.
    WHEN 'PRINT'.
    LEAVE TO LIST-PROCESSING.
    WRITE :/ IO1.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    8. Create a Tcode -> Activate all -> Execute.
    CREATING TABSTRIPS IN MPP:
    In a normal screen, we can add only maximum of 40 components.
    To make a screen hold more than 40 components, we can use tabstrip controls.
    NAVIGATIONS TO CREATE TABSTRIP CONTROL:
    1. Create an MPP program.
    2. Create a normal screen (100)
    -> Add Tabstrip Control component from toolbar
    -> By default, a tabstrip control is created with 2 tab buttons
    -> Double click on tabstrip control
    -> Specify name (TBSTR) in Attributes box
    -> Click on First tab button
    -> Add Subscreen Area from toolbar to first tab button
    -> Double click on subscreen area
    -> Specify name (SUB1)
    -> Click on Second tab button
    -> Repeat same process for adding subscreen area (SUB2)
    -> Double click on First tab button
    -> Specify attributes (TAB1,FIRST,TAB1)
    -> Double click on Second tab button
    -> Specify attributes (TAB2, SECOND, TAB2)
    -> SAve
    -> Flowlogic.
    3. Create two subscreens (10, 20) -> Add required components in each subscreen.
    4. In Top Include File, specify following code:
    DATA : IO1(10), IO2(10), IO3(10), IO4(10).
    CONTROLS TBSTR TYPE TABSTRIP.
    DATA A LIKE SY-DYNNR.
    'CONTROLS' statement is used to allocate a memory area for the tabstrip created in the normal screen. 'TABSTRIP' itself is a data type for the tabstrip control. Whenever a tabstrip is created, SAP creates an object called 'ACTIVETAB' which is used to call the corresponding subscreens for each tab button in PAI.
    5. In Flowlogic editor, write following code to initiate the subscreens to the corresponding subscreen areas of each tab button when the main screen is called:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    CALL SUBSCREEN SUB1 INCLUDING 'SAPMZTABSTRIP' '10'.
    CALL SUBSCREEN SUB2 INCLUDING 'SAPMZTABSTRIP' '20'.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    CALL SUBSCREEN SUB1.
    CALL SUBSCREEN SUB2.
    6. In PAI, specify following code for click events on each tab button:
    CASE SY-UCOMM.
    WHEN 'TAB1'.
    A = '10'.             * calls specified subscreen during PAI     
    TBSTR-ACTIVETAB = 'TAB1'.  * makes entire tab button in active status
    WHEN 'TAB2'.
    A = '20'.
    TBSTR-ACTIVETAB = 'TAB2'.
    WHEN 'DISPLAY'.
    LEAVE TO LIST-PROCESSING.
    WRITE :/ IO1, IO2, IO3, IO4.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    7. Create a Tcode -> Activate all -> Execute.
    TABLE CONTROLS:
    Table Control component is used to view the internal table contents in the screen.
    Navigations to create Table control component:
    1. Create an MPP program.
    2. In Top include File, declare variables as follows:
    DATA ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    DATA ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    CONTROLS TBCL TYPE TABLEVIEW USING SCREEN 100.
    DATA CUR TYPE I VALUE 5.
    -> Save -> Activate.
    3. Create a Screen (100) -> Select Table control component from toolbar -> Double Click and specify name (TBCL) -> Press F6 and specify internal table name (ITAB) -> Select required fields -> Paste on the Table control -> To separate the fields, use Separators option in Table control Attributes -> Specify labels if necessary -> Create pushbuttons (FETCH, MODIFY, PRINT, EXIT) -> Save -> Flowlogic.
    4. In PAI module, specify following code:
    CASE SY-UCOMM.
    WHEN 'FETCH'.
    SELECT * FROM KNA1 INTO TABLE ITAB.
    TBCL-LINES = SY-DBCNT.  * To create Vertical Scrollbar
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'PRINT'.
    GET CURSOR LINE CUR.
    READ TABLE ITAB INDEX CUR.
    LEAVE TO LIST-PROCESSING.
    WRITE :/ ITAB-KUNNR, ITAB-NAME1, ITAB-ORT01, ITAB-LAND1.
    WHEN 'MODIFY'.
    LOOP AT ITAB1.
    MODIFY KNA1 FROM ITAB1.
    IF SY-SUBRC = 0.
    MESSAGE S002(ZMSG).
    ELSE.
    MESSAGE E003(ZMSG).
    ENDIF.
    ENDLOOP.
    SELECT * FROM KNA1 INTO TABLE ITAB.
    TBCL-LINES = SY-DBCNT.
    ENDCASE.
    5. In FlowLogic editor, specify following step loops:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB CURSOR CUR WITH CONTROL TBCL.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    LOOP AT ITAB.
        MODULE NEW.     * New module to move records from ITAB to                 ITAB1. Double click on Module Name (New)                 to create a new one.
    ENDLOOP.
    6. Specify following code in the NEW module:
       MODULE NEW INPUT.
         APPEND ITAB TO ITAB1.
       ENDMODULE.                
    7. Create a Tcode -> Activate all -> Execute.
    USING TABLE CONTROL WIZARD:
    This is a predefined SAP-specific component to create table control using predefined navigations.
    1. Create an executable program (Z_TABLEWIZARD) in SE38 editor. Write the following code:
    CALL SCREEN 200.
    -> Save -> Activate.
    2. Goto SE51 -> Specify program name created earlier (Z_TABLEWIZARD) -> Specify Screen number (200) -> Layout -> Select Table Control (Wizard) component from toolbar -> Opens Table control Wizard -> Follow the navigations -> Save and Activate the table control.
    3. Execute the program (Z_TABLEWIZARD).
    Regards,
    Priya.

  • How to Draw a graph Using layout In a module pool Program

    Hello Friends
                   How to Represent a Graph in the layout  in a module pool program.
    Plz suggest me.
    Thanking you all
    lavanya

    THIS IS AN EXAMPLE PROGRAM FOR GRAPHICS.
    Run this program & see whether it will be useful for u or not.
    before running dont forget to set the pf status.
    after copying double click the pf status & in application tool bar. give function code like this.
    PF07 - for 2d graph.
    PF06 - for 3d
    PF05 - for 4d
    DATA: BEGIN OF DATA OCCURS 1,
            P TYPE P,
          END OF DATA.
    --- options-table -
    DATA: BEGIN OF OPTS OCCURS 1,
             C(80) TYPE C,
          END OF OPTS.
    DATA: BEGIN OF TDIM1 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM1.
    DATA: BEGIN OF TDIM2 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM2.
    DATA: BEGIN OF TDIM3 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM3.
    DATA: BEGIN OF MAX OCCURS 1,
             D1(3) TYPE P VALUE 4,
             D2(3) TYPE P VALUE 5,
             D3(3) TYPE P VALUE 6,
          END OF MAX.
    DATA: TYEAR1(5) VALUE '#1991',
          TYEAR2(5) VALUE '#1992',
          TYEAR3(5) VALUE '#1993',
          TYEAR4(5) VALUE '#1994'.
    DATA: TPROD1(9),
          TPROD2(9),
          TPROD3(9),
          TPROD4(9),
          TPROD5(9).
    TPROD1 = TEXT-P01.
    TPROD2 = TEXT-P02.
    TPROD3 = TEXT-P03.
    TPROD4 = TEXT-P04.
    TPROD5 = TEXT-P05.
    DATA: TLAND1(20),
          TLAND2(20),
          TLAND3(20),
          TLAND4(20),
          TLAND5(20),
          TLAND6(20).
    TLAND1 = TEXT-L01.
    TLAND2 = TEXT-L02.
    TLAND3 = TEXT-L03.
    TLAND4 = TEXT-L04.
    TLAND5 = TEXT-L05.
    TLAND6 = TEXT-L06.
    DATA: INDEX     LIKE  SY-INDEX.
    DATA: MAXD(3)    TYPE  P.
    DATA: TYP.
    FIELD-SYMBOLS: <F>.
    SET PF-STATUS 'GRAF'.
    PERFORM FILL_DATA.
    MAXD = MAX-D1 * MAX-D2.
    *{listdisplay
    display of a list:                                                   *
    for 5 countries each 4 colums (years) and 5 lines (products)
    WRITE: / TLAND1.
    INDEX = 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND2.
    INDEX = MAXD + 1.
    PERFORM LISTE.
    NEW-PAGE.
    WRITE: / TLAND3.
    INDEX = 2 * MAXD + 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND4.
    INDEX = 3 * MAXD + 1.
    PERFORM LISTE.
    NEW-PAGE.
    WRITE: / TLAND5.
    INDEX = 4 * MAXD + 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND6.
    INDEX = 5 * MAXD + 1.
    PERFORM LISTE.
    PF05: 4D-graphic, general function-module                            *
    AT PF05.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-type: perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colours: regular  -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR2 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
    *--- dimension 2
      REFRESH TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD2 TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD3 TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD4 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
    *--- dimension 3
      REFRESH TDIM3.
      MOVE TLAND1 TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      MOVE TLAND3 TO TDIM3.
      APPEND TDIM3.
      MOVE TLAND4 TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
                DIM2  = TEXT-P00
                DIM3  = TEXT-L00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
    PF06: 3D-graphic general function-module                             *
    AT PF06.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-Type: perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colours: regular -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR3 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
    *--- dimension 2
      REFRESH TDIM2.
      MOVE TPROD1 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD3 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD5 TO TDIM2.
      APPEND TDIM2.
      REFRESH TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
                DIM2  = TEXT-P00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
    PF07: 2D-graphic general function-module                             *
    AT PF07.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-type perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colour: regular -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR3 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
      REFRESH TDIM2.
      REFRESH TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
          FORM LISTE                                                    *
          displays a list with turnover figures                         *
          (products and years)                                          *
    FORM LISTE.
      DATA: CNT_MOD LIKE SY-TABIX.
      DATA: CNT_DIV LIKE SY-TABIX.
      WRITE: / TEXT-P00,22 TYEAR1,39 TYEAR2,56 TYEAR3, 73 TYEAR4.
      SKIP 2.
      DO MAXD TIMES.
        READ TABLE DATA INDEX INDEX.
        IF SY-SUBRC NE 0. EXIT. ENDIF.
        INDEX = INDEX + 1.
        CNT_MOD = SY-INDEX MOD MAX-D1.
        CNT_DIV = SY-INDEX DIV MAX-D1.
        IF CNT_MOD EQ 1.
          CASE CNT_DIV.
            WHEN 0.
              WRITE: / TPROD1, ' '.
            WHEN 1.
              WRITE: / TPROD2, ' '.
            WHEN 2.
              WRITE: / TPROD3, ' '.
            WHEN 3.
              WRITE: / TPROD4, ' '.
            WHEN 4.
              WRITE: / TPROD5, ' '.
          ENDCASE.
        ENDIF.
        WRITE: DATA-P.
      ENDDO.
    ENDFORM.
          FORM FILL_DATA                                                *
          fills the datatable                                           *
    FORM FILL_DATA.
      DATA-P = 153470.
      APPEND DATA.
      DATA-P = 243470.
      APPEND DATA.
      DATA-P = 124567.
      APPEND DATA.
      DATA-P = 179037.
      APPEND DATA.
      DATA-P = 234980.
      APPEND DATA.
      DATA-P = 287513.
      APPEND DATA.
      DATA-P = 253430.
      APPEND DATA.
      DATA-P = 223440.
      APPEND DATA.
      DATA-P =  24567.
      APPEND DATA.
      DATA-P = 180037.
      APPEND DATA.
      DATA-P = 129830.
      APPEND DATA.
      DATA-P = 145530.
      APPEND DATA.
      DATA-P = 132470.
      APPEND DATA.
      DATA-P = 453470.
      APPEND DATA.
      DATA-P =  24456.
      APPEND DATA.
      DATA-P = 119807.
      APPEND DATA.
      DATA-P = 288710.
      APPEND DATA.
      DATA-P = 166656.
      APPEND DATA.
      DATA-P = 300430.
      APPEND DATA.
      DATA-P = 723110.
      APPEND DATA.
      DATA-P =  22767.
      APPEND DATA.
      DATA-P = 195522.
      APPEND DATA.
      DATA-P =  38970.
      APPEND DATA.
      DATA-P =  89635.
      APPEND DATA.
      DATA-P = 166970.
      APPEND DATA.
      DATA-P = 401470.
      APPEND DATA.
      DATA-P =  29967.
      APPEND DATA.
      DATA-P = 112957.
      APPEND DATA.
      DATA-P =  37860.
      APPEND DATA.
      DATA-P =  77450.
      APPEND DATA.
      DATA-P = 253150.
      APPEND DATA.
      DATA-P = 343570.
      APPEND DATA.
      DATA-P = 768867.
      APPEND DATA.
      DATA-P = 236790.
      APPEND DATA.
      DATA-P = 122750.
      APPEND DATA.
      DATA-P = 328760.
      APPEND DATA.
      DATA-P = 292150.
      APPEND DATA.
      DATA-P = 356570.
      APPEND DATA.
      DATA-P = 268867.
      APPEND DATA.
      DATA-P =  36790.
      APPEND DATA.
      DATA-P = 125680.
      APPEND DATA.
      DATA-P = 178893.
      APPEND DATA.
      DATA-P = 333150.
      APPEND DATA.
      DATA-P = 373570.
      APPEND DATA.
      DATA-P = 168867.
      APPEND DATA.
      DATA-P = 226790.
      APPEND DATA.
      DATA-P = 278940.
      APPEND DATA.
      DATA-P = 177784.
      APPEND DATA.
      DATA-P = 234150.
      APPEND DATA.
      DATA-P = 296570.
      APPEND DATA.
      DATA-P = 233867.
      APPEND DATA.
      DATA-P =  16790.
      APPEND DATA.
      DATA-P = 125590.
      APPEND DATA.
      DATA-P = 208760.
      APPEND DATA.
      DATA-P = 113150.
      APPEND DATA.
      DATA-P = 388570.
      APPEND DATA.
      DATA-P = 565867.
      APPEND DATA.
      DATA-P = 211790.
      APPEND DATA.
      DATA-P = 277480.
      APPEND DATA.
      DATA-P = 277489.
      APPEND DATA.
      DATA-P = 53470.
      APPEND DATA.
      DATA-P = 321560.
      APPEND DATA.
      DATA-P = 452456.
      APPEND DATA.
      DATA-P = 174695.
      APPEND DATA.
      DATA-P = 277590.
      APPEND DATA.
      DATA-P = 177490.
      APPEND DATA.
      DATA-P = 153470.
      APPEND DATA.
      DATA-P = 467560.
      APPEND DATA.
      DATA-P = 222456.
      APPEND DATA.
      DATA-P = 198695.
      APPEND DATA.
      DATA-P =  99470.
      APPEND DATA.
      DATA-P = 100340.
      APPEND DATA.
      DATA-P = 11470.
      APPEND DATA.
      DATA-P = 323560.
      APPEND DATA.
      DATA-P = 434456.
      APPEND DATA.
      DATA-P = 224695.
      APPEND DATA.
      DATA-P = 277490.
      APPEND DATA.
      DATA-P = 467890.
      APPEND DATA.
      DATA-P = 953470.
      APPEND DATA.
      DATA-P =  67560.
      APPEND DATA.
      DATA-P = 298456.
      APPEND DATA.
      DATA-P =  98695.
      APPEND DATA.
      DATA-P = 577900.
      APPEND DATA.
      DATA-P = 199490.
      APPEND DATA.
      DATA-P = 18470.
      APPEND DATA.
      DATA-P = 390560.
      APPEND DATA.
      DATA-P = 411456.
      APPEND DATA.
      DATA-P =  94695.
      APPEND DATA.
      DATA-P = 182000.
      APPEND DATA.
      DATA-P = 260570.
      APPEND DATA.
      DATA-P = 367356.
      APPEND DATA.
      DATA-P = 231850.
      APPEND DATA.
      DATA-P = 436645.
      APPEND DATA.
      DATA-P = 346650.
      APPEND DATA.
      DATA-P =  82500.
      APPEND DATA.
      DATA-P = 300560.
      APPEND DATA.
      DATA-P = 467109.
      APPEND DATA.
      DATA-P = 161850.
      APPEND DATA.
      DATA-P = 356470.
      APPEND DATA.
      DATA-P = 198840.
      APPEND DATA.
      DATA-P = 199000.
      APPEND DATA.
      DATA-P = 340570.
      APPEND DATA.
      DATA-P = 127356.
      APPEND DATA.
      DATA-P = 591850.
      APPEND DATA.
      DATA-P = 287460.
      APPEND DATA.
      DATA-P = 299770.
      APPEND DATA.
      DATA-P =  12500.
      APPEND DATA.
      DATA-P = 230560.
      APPEND DATA.
      DATA-P = 437109.
      APPEND DATA.
      DATA-P = 191850.
      APPEND DATA.
      DATA-P =  36780.
      APPEND DATA.
      DATA-P =  78789.
      APPEND DATA.
      DATA-P = 282000.
      APPEND DATA.
      DATA-P = 270570.
      APPEND DATA.
      DATA-P = 567356.
      APPEND DATA.
      DATA-P =  31850.
      APPEND DATA.
      DATA-P = 92410.
      APPEND DATA.
      DATA-P = 121350.
      APPEND DATA.
      DATA-P = 67356.
      APPEND DATA.
      DATA-P = 431891.
      APPEND DATA.
    ENDFORM.

  • Run Program in background

    Hi
    I know there is a post about this already in the newsgroup but I think I
    need something different.
    I need a way to make my program completely invisible to my users basically
    have it running as a service. I can't for some reason remove the FP in the
    app builder of my toplevel vi, I don't know why. And anyway, would removing
    the FP in the app builder also remove the vi in the taskbar? Does anyone
    know how to do this?
    Thanks
    Jacob Thastrup

    The program is for a Win2K/NT4 enviroment. I have never herd of a Win2K/NT4
    command/program called "Xvfb". Do I need to use a different command or can
    I send the display to another place?
    Thanks
    Jacob Thastrup
    [email protected] (Ricardo Leal) wrote in
    <[email protected]>:
    >Content-Type: text/plain; charset=us-ascii
    >Content-Transfer-Encoding: 7bit
    >
    >Jacob Thastrup wrote:
    >
    >> Hi
    >>
    >> I know there is a post about this already in the newsgroup but I think
    >> I need something different.
    >> I need a way to make my program completely invisible to my users
    >> basically have it running as a service. I can't for some reason remove
    >> the FP in the app builder of my toplevel vi, I don't know why. And
    >> anyway, would removing the FP in the app builder also remove the vi in
    >> the taskbar? Does anyone know how to do this?
    >>
    >> Thanks
    >>
    >> Jacob Thastrup
    >
    >Jacob:
    >
    >I tryied to hide the front panel with labview application builder for
    >linux but it doesn't remove the front panel. I got this
    >in Linux, you must create a virtual frame buffer first and then send the
    >graphical out of labview to this virtual x-window.
    >
    >For create the virtual frame, execute the following command:
    >
    >Xvfb :1 -screen 0 160x120x16 &
    >
    >with this you create a virtual frame buffer of 160x120 and 16 bits, then
    >you must send the application to this x-window:
    >
    >Application -display :1 &
    >
    >With this you can execute a program whithout graphical out and also you
    >can mantain in background with nohup command.
    >
    >
    >
    >--
    >*********************************************************
    >Ricardo Leal Pacheco.
    >e-mail: [email protected]/[email protected]
    >FONO: (09)7111100, 654622.
    >INGENIERIA CIVIL ELECTRONICA U.T.F.S.M
    >*********************************************************
    >
    >
    >
    >--------------25B9B630C9B3D0B8D29F4A83
    >Content-Type: text/html; charset=us-ascii
    >Content-Transfer-Encoding: 7bit
    >
    >
    >
    >Jacob Thastrup wrote:
    >Hi
    >I know there is a post about this already in the newsgroup but I
    >
    >I
    >
    need something different.
    >
    I need a way to make my program completely invisible to my users
    >have it running as a service. I can't for some reason
    >
    >in the
    >
    app builder of my toplevel vi, I don't know why. And anyway, would
    >removing
    >
    the FP in the app builder also remove the vi in the taskbar? Does
    >know how to do this?
    >
    Thanks
    >
    Jacob Thastrup
    >Jacob:
    >I tryied to hide the front panel with labview application builder for
    >linux but it doesn't remove the front panel. I got this
    >
    in Linux, you must create a virtual frame buffer first and then send
    >the graphical out of labview to this virtual x-window.
    >
    For create the  virtual frame, execute the following command:
    >
    Xvfb :1 -screen 0 160x120x16  &
    >
    with this you create a virtual frame buffer of 160x120 and 16 bits,
    >then you must send the application to this x-window:
    >
    Application -display :1  &
    >
    With this you can execute a program whithout graphical out and also
    >you can mantain in background with nohup command.
    >
    >
    >
    >*********************************************************
    >Ricardo Leal Pacheco.
    >e-mail: [email protected]/[email protected]
    >FONO: (09)7111100, 654622.
    >INGENIERIA CIVIL ELECTRONICA U.T.F.S.M
    >*********************************************************

    >
    >--------------25B9B630C9B3D0B8D29F4A83--

  • Suggestions for creating LOGOS and GRAPHICS??

    I create logos as kind of a "hobby". I usually use PAGES to create as most are manipulations of fonts, shapes and importing images, etc.
    I realize I am limited by PAGES in terms of producing high quality images for reproduction.
    Does anyone have a suggestion for the next best program to use? I don't have the patience or time to learn COREL DRAW - I'm hoping there is something in between PAGES and programs similar to COREL!
    SUGGESTIONS are really, really appreciated!
    Thank you.

    I do monograms in Photoshop Elements which is really a program for photo manipulation but is a great program for graphic design. I went with Elements since it is a lot cheaper than the full version of Photoshop and has everything I need.

  • Reply  immediatelt !!!!!!!!! implement Graphics Class in application Progra

    Dear Sir,
    How to implement Graphics Class in an Constructor in an Application Program.
    for Example
    In Applet
    public void init(){
    Graphics g;
    Dimension d;
    Font f;
    FontMetrics fm;
    g = getGraphics();
    d = size();
    f=new Font("Dialog",Font.PLAIN,12);     
    g. setFont(f);
    fm = g.getFontMetrics();
    standalone Application program
    Words(){
    Graphics g;
    Dimension d;
    Font f;
    FontMetrics fm;
    g = getGraphics();
    d = size();
    f=new Font("Dialog",Font.PLAIN,12);     
    g. setFont(f);
    fm = g.getFontMetrics();
    when we try to implement in an standlone Application program it gives
    Null Pointer Exception how to implement Grapics Class in an constructor of standlone Application program.

    I think this is an appropriate reply for this...

  • Regarding graphics.h in xcode

    Hello i m vijay sehgal. I hav learnt c language and i want that in my xcode of mac os x lion i want to run the c program in graphics. Please tell is there any way through which i can get the hint to do that program in xcode.

    I think the solution was to force it to use the 10.4 sdks... in any case it seems to work now.

  • Adobe Actions in Photoshop elements

    I have recently acquired a program that was originally designed on Adobe Photoshop.
    I am using Adobe Photoshop Elements, bot most features are included
    One difference is that Photosop Element does not have an 'action button' to load the action script.
    However, I have copied these in manually
    Action Taken
    a) Installed graphic program into c:\Program Files\graphic program
    b) Opened the Action Script Folder and copied all the Action Scripts files
    c) c:\Program Files\Adobe\Photoshop Elements\presets\Photoshop Actions\
    d) Pasted all the action scripts that I copied from the Action Script Folder
    So Far So Good
    Opened Photoshop Elements : They have a file browser button. From here I can browse to :-
    c:\program Files\Adobe\Photoshop Elements\presets\Photoshop Actions\
    But I cannot load any templates or activate the program
    Can anyone advise on this please
    Brian

    Hi Barbara,
    Thanks for your response
    I am using Photoshop Elements 2.0 and the third party program in question is "eCoverGo"
    http://www.ecovers-go.com/
    As mentioned it was designed for Adobe Photoshop and required all the files to be placed in the photoshop action folder.
    Photoshop Elements does not have an action feature, but I followed their procedure and copied all the files into the Elements/photoshop actions folder OK. But there is no way to load these files into Photoshop Elements.
    I have asked how they activate these files in photoshop, and received the following
    "copy the shortcut into the relevant directory (depending on which version of Photoshop), then I go to the actions window and select the action.
    Select the first step and press the play button, modify the image created, and then run step 2 and step 3.
    I can also double click an action in its folder and it will open in Photoshop."
    The problem is' Photoshop Elements does not have an 'Actions Window' and the second is, after double clicking on an action in it's folder, Photoshop opens and I'm back to square one!!"
    I realise that I may be whistling in the Wind, and no way take the program developer to task, because it has been designed for Adobe Photoshop and not Photshop Elements.
    And it defeats the whole exercise by purchasing Adobe Photoshop for the sake of getting a low budget program to work, when Photoshop Elements suit my requirements at the moment
    Once again, thanks for your interest Barbara, but don't drive
    yourself crazy.If it wont work in Elementsthen it wont work!
    Best regards
    Brian

  • Considering dumping my iMac for a PC used for DSLR video editing on Premiere CS6. Help!

    So I edit mostly 1080p DSLR footage taken from my canon T3i camera. I purchased a 2011 (the latest model) iMac a little over a year ago, upgraded the RAM to 12GB and it has worked reasonably well. I purchased the base model for $1200 which has a quad core i5 processor, 512mb of video ram, and a measly 500gb hard drive. The past couple of days I have come to the realization that I only use Adobe Programs for graphically intensive work (premiere, after effects, etc). I originally bought my iMac for final cut, but FCPX SUCKS and I switched to Premiere CS6 which works like a dream. Anyways, I'm a senior in high school and do lots of video editing (going to major in video production in college). I'm likely going to differ college for a year and continue my video production business (pretty informal) as well as video production internships at a couple companies (so don't suggest that I get a laptop for portability, not an issue). I just shot an entire wedding with 2 DSLR's and the footage takes up over 20% of my hard drive which is unacceptable. This is very troublesome for me and has been clogging up my computer considerably. I have realized it would make a lot of sense to sell my iMac and purchase a PC that's not only faster, but has much more space. I was ideally looking to sell my iMac for $1000, and from that get a better and faster PC setup for my video editing. $200 would be allocated for a 24" 1080p LED 5ms Asus monitor (from newegg) which would leave $800 remaining for the PC. Ideally it'd be nice to have a little cash left over. Some things that sound appealing to me are: an intel i7 quad core proccessor at least 3.0+ Ghz,  16 GB of ram (maybe 8 to start), 1 GB of video RAM (here is where I'm stuck, my Imac had a Radeon 512mb video card in it, but I've heard premiere runs especially well with nVidia CUDA cards? Don't really know too much about this stuff.) I have no idea what type of card to get, and if I would even see a performance upgrade from my iMac. For storage I'd like at least 2TB of space, should I get two seperate 1 TB drives? One for boot and software and another for video files? Anyways, I assume I can benefit from selling my 2011 i5 iMac to get a faster PC equivalent at a lower price since I mainly edit videos (which is pretty graphically intense) from an HD DSLR camera. I've noticed premiere rendering times on my mac are starting to get pretty slow these days. Ideally it'd be nice to buy a desktop (already assembled) maybe from HP for around $600 (not including the monitor). I'm not completely against building a PC from parts (since I know a friend who can do it for me) I just need help figuring out WHAT exactly it is that I need and would benefit from.

    Buy a Desktop Video Editing PC
    http://www.adkvideoediting.com/
    -ADK Kudos http://forums.adobe.com/thread/877201
    Build a Desktop Video Editing PC
    -http://ppbm7.com/index.php/intro-part-1
    -http://forums.adobe.com/thread/1098759
    -http://forums.adobe.com/thread/878520?tstart=0
    -http://forums.adobe.com/thread/815798
    -http://www.shawnlam.ca/2012/premiere-pro-cs6-video-editing-computer-build/
    -http://www.videoguys.com/Guide/E/Videoguys+DIY9+Its+Time+for+Sandy+Bridge+E/0xe9b142f408a2 b03ab88144a434e88de7.aspx

  • Errors/Glitches with my brand new Equium A200 15I (incl video hardware)

    Hi,
    I just treated myself to a new laptop last Saturday and have thus only had it for about 3 and a half days so far but I noticed a few small things that I weren't sure were errors/faults or if they were just because its new, such as the fact that sometimes I type things with the keyboard and some of the letters don't appear on screen, which I think is probably more to do with me not typing or pressing heavily enough on the keys rather than anything else, its not happening so much now...the touch pad gets a bit sticky too and it thinks I want to scroll up and down when I want to move the cursor not scroll sometimes but I manage to get it to work, I think most laptops have glitches like this and presumably I could help fix it by calibrating the touch pad(?) I haven't had time to look into that yet though... there are a few other things though and most worryingly just this morning I got a video hardware error message, so now im a fair bit worried/suspicious that there may be a real fault with it and would like to know if this is the case, whether its something I can possibly fix (im no real expert especially with hardware but I can always try downloading and installing updates/fixes and that sort of thing if it'd fix problems).
    The main thing which is worrying me most, is that this morning a message suddenly came up on screen, warning me that there had been a video hardware error, yesterday evening, which I clicked on a button I think to load more info. and I took this screen cap of it:-
    http://img528.imageshack.us/img528/724/errorscreencapcw1.jpg
    I thought it may help to show the actual full message rather than just trying and pasting the info., well ok to be honest I didn't notice it let you copy it to clipboard but oh well (oops lol).
    I know there's a topic about a similar error but I didn't want to butt in on that discussion as I presume that should be for that persons error to be discussed, mine may be slightly different I don't know... I followed the instructions given in that discussion and checked the device manager and no hardware faults are showing up there, btw it says in the device manager, under display adapters, that its a Mobile Intel 945GM Express Chipset Family, im sure all the A200 15I laptops have the same card but I thought I'd just clarify that. Incase that wasn't the right thing to check I also checked under 'sound, video and game controllers' (as the error said it was a video hardware error) where it lists the only one as being 'Realtek High Definition Audio' and I checked the properties there, on both under properties it says that the device is working properly, with no signs of any faults...
    The thing is, I had read online somewhere that there is some issue with the graphics or video cards. I'd read that they can be glitchy and sometimes break down after the one year. I'd also asked my dad about this and we checked that it was an Intel graphics card that came with this laptop, which it is, and we reckoned that Intel chips should be as reliable as any other brand really... so I didn't think that there should be a problem, though if there is I have until next September to get it fixed before the warranty expires!
    What surprises or kind of worries me though, is that the error message was only presented to me this morning. It dates the error as having occured at 19:53pm... I was using it last night and infact I went to have a shower and I put the laptop screen down before I went to shower at around 7:35pm, I presumed that its ok to just close the lid and it would automatically go into hibernate mode or something similar(?) im wondering if that had something to do with it, as I 7:53pm would have been roughly when I came back and lifted the lid/screen up again to use the laptop again... I can only presume, given the time it quotes, thats what caused the fault?
    It does give me the option to 'update driver software' and 'scan for hardware change' within the device manager, should I run both or either of those perhaps? is this a common glitch? should I be worried at all etc...
    Any help is much appreciated, if more info. is needed then let me know and ill clarify what I can. Also in terms of whats installed, I have quite a few programs, for graphics I have an old version of Paint Shop Pro which I installed yesterday morning, it seemed to install fine, thats Paint Shop Pro 7 from Jasc, I also have some converter programs (for vid files, 3GP and stuff), AVG Virus scan, Spybot Search & Destory, DBPowerAmp, FTP Commander, Quicktime and Real Player, fairly basic stuff like that, nothing much else just my old pics and vid files I transferred from my old XP laptop to this one, in my documents... I don't have any high powered or complicated games or anything else like that installed. Also at the time the video hardware error message states, all that was running when I had the lid down (or before I put the lid down) would have been Windows Live Messenger (though im pretty sure I signed out before putting the lid down) and an IE window, im pretty sure thats all, I wasn't working on anything else just checking the 'net...
    There are some other things I've noticed too that I thought perhaps I should mention(?), one thing I've noticed it doing is the screen going blank and then coming back very quickly, alot. I've already asked about this a day or so ago as by then I realised that it was only doing that before loading the 'Windows needs your permission to continue' window/message, which apparently its supposed to do and is something to do with the computer switching from displaying the normal desktop to the secure desktop, which I sort of understand lol.
    So I believe that isn't anything to worry about but I have noticed over the lastday or so, that the screen seems to do this more, going blank then coming back again, even when that permission message doesn't show up.
    For instance this morning when I first put it on and went to check my home page, I clicked on a link at the bottom of the page or wherever to load another page within the website and the screen went blank for a moment before coming back a second later with the requested page. Is this normal too? or a Vista related glitch, or is there a possibility there may be a glitch with the monitor? im guessing it may be more of a Vista thing but I thought I'd ask here just incase, I decided not to pay for any extra insurance/extended warranty as I'm very careful with my items and take good care of them and so I'm being careful to try and spot any faults early on while they may be fixable under the basic warranty and what-not...
    Another thing I've noticed is that to start with, when I pressed and held the 'FN' button, a range of black and white icons appeared on screen which told me which F button(s) to use to make certain adjustments, it still does that when I try it now but at other times, it doesn't show the icons, no matter how long I hold the 'FN' button down. That doesn't really matter since I can tell from the symbols on the keys on the keyboard which buttons to press but its just inconsistent, is there a reason why sometimes the row of icons on screen will show up when I press and hold the 'FN' button and other times it won't show at all?
    Also sometimes if I move the cursor right to the top of the screen, those icons load as they seem to always be located at the very top of the screen but sometimes this is a problem, if im trying to click on something else and one of those icons comes up instead... im sure you can switch this option off somehow but should I be worried that the icons don't always show when I press and hold the right button(?) just trying to be cautious!
    I think this post is long enough and I can't think what else I could possibly add to help, so I'll leave this here. I don't mean to seem too paranoid but thought it best to mention this stuff incase anyone recognises these glitches/errors and can recommend a quick way to fix any problems before they may develop into anything worse... many thanks in advance for any help with any of these issues!!
    (mods let me know if im wrong to include so many things in one topic, I kind of did this quickly and I apologise if im breaking any rules I don't mean to, if possible please break this into a few different topics or I can do this, though ill be at work frm 2-9pm today so might not be back and able to check here until Thursday morning (October 4th))

    Hi Isla
    Your message is really, very, very long. I think its too long to read it twice ;)
    . Regarding all your issues on this notebook well. it looks like you have installed many 3rd party programs and applications. In such case its not easy to say if such issues are software or hardware related. But I presume its software.
    I checked your screenshot pic but I have never seen such error message. But it looks like something wrong with the graphic card driver. The message says something about Live Kernel Event
    A kernel's services are requested by other parts of the operating system like graphic card driver for example.
    In such case I would recommend updating the graphic driver. According to you message its a Intel GPU. So you could check the Intel page for the compatible graphic chip driver.
    Regarding the FN key issue;
    The Toshiba FlashCard utility controls the FN key functionality. I have read in this forum that this application does not run smoothly and in some cases it causes some issues. The new update should solve the problems. You should check the Toshiba driver page. The FlashCard Utility is a part of the Toshiba Value added package.
    So finally one more hint:
    You should always check for the Vista updates on the Microsoft page. This OS is not perfected and Microsoft releases very often patches and fixes
    Hope it could helps a little bit.
    If necessary just ask for more info :)
    Regards

Maybe you are looking for

  • Idoc related issuse

    Dear all, I have some problem in idoc related issuses.i preparing technical documents from FS. There are some filds coming from the client system to sap systmm,.there r nearly 7 field(parent). And 9 fields (childs).this is from cls to WBI . I have to

  • How to control a reference type of BAM Relation to see Related Activites on BAM Portal?

    Hi. There is description of predefined reference types of BAM relations. I have created relation between two activities by adding Relationship node to one of them (to an activity that is tracking detailed orchestration). Both activity are declared

  • OWB Release 2 Download link not working

    When i try to download the new OWB Release 2 (10.2.0.1) for the windows platform i get 404-Error. http://www.oracle.com/technology/software/htdocs/devlic.html?http://download.oracle.com/otn/nt/warehouse/10201/OWB_10.2.0.1.win.zip Can you please fix t

  • Compiling "unzip" triggers bug

    When compiling "unzip" from NetBSD's pkgsrc under Solaris 10, the following bug is triggered: gcc -c -I/usr/local/pkgsrc/pkgsrc-2008Q3/include -O -I. -DUNIX -Dunix -DUSE_UNSHRINK -I/usr/local/pkgsrc/pkgsrc-2008Q3/include -DSFX inflate_.c Assertion fa

  • There is no option of none in payment

    id