How to set the background for all components?

hi
Does anybody know how to set the DEFAULT background color in an application.. I need it because in jdk 1.3 the default bgcolor is grey and in 1.5 it is white.. and I wish white as well.. so to make it also white in jdk 1.3 I need to use the (a bit annoying) anyContainer.setBackground( Color.white ); and these are lots in my app.. So my question is: is there such an overall class with a function (say UIManager.setComponentsBackground( Color color ) ) for such a purpose?
any tip or link would be greatly appreciated

Does anybody know how to set the DEFAULT background color in an applicationthis might get you close
import java.awt.*;
import javax.swing.*;
import java.util.Enumeration;
class ApplicationColor extends JFrame
  public ApplicationColor()
    setApplicationColor(Color.RED);
    setLocation(400,300);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    JPanel jp = new JPanel(new BorderLayout());
    jp.add(new JTextField("I'm a textfield"),BorderLayout.NORTH);
    jp.add(new JComboBox(new String[]{"abc","123"}),BorderLayout.CENTER);
    jp.add(new JButton("I'm a button"),BorderLayout.SOUTH);
    getContentPane().add(jp);
    pack();
  public void setApplicationColor(Color color)
    Enumeration enum = UIManager.getDefaults().keys();
    while(enum.hasMoreElements())
      Object key = enum.nextElement();
      Object value = UIManager.get(key);
      if (value instanceof Color)
        if(((String)key).indexOf("background") > -1)
          UIManager.put(key, color);
  public static void main(String[] args){new ApplicationColor().setVisible(true);}
}

Similar Messages

  • How to set a   background for jFrame?

    Hai.i have a code for background image.i.e
    * TextOver.java
    * Created on June 23, 2008, 1:53 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    public class TextOver
    private static final String IMAGE_PATH =
    "http://upload.wikimedia.org/wikipedia/commons/b/b5/HMS_Cardiff_%28D108%29_1.jpg";
    private BufferedImage image;
    private JTextArea textarea = new JTextArea(20, 40);
    private JPanel mainPanel = new JPanel()
    @Override
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if (image != null)
    g.drawImage(image, 0, 0, this);
    public TextOver()
    URL imageUrl;
    try
    imageUrl = new URL(IMAGE_PATH);
    image = ImageIO.read(imageUrl);
    Dimension imageSize = new Dimension(image.getWidth(), image.getHeight());
    mainPanel.setPreferredSize(imageSize);
    JScrollPane scrollpane = new JScrollPane(textarea);
    textarea.setOpaque(false);
    scrollpane.setOpaque(false);
    scrollpane.getViewport().setOpaque(false);
    mainPanel.add(scrollpane);
    catch (MalformedURLException e)
    e.printStackTrace();
    catch (IOException e)
    e.printStackTrace();
    public JPanel getPanel()
    return mainPanel;
    private static void createAndShowGUI()
    admin_login_code a=new admin_login_code();
    a.setVisible(false);
    JFrame frame = new JFrame("TextAreaOverImage Application");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new TextOver().getPanel());
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(false);
    public static void main(String[] args)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    createAndShowGUI();
    i want to give this backgground to my existing jFrame something like
    import java.sql.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class admin_login_code extends javax.swing.JFrame {
    String admin_name;
    String password;
    Connection con;
    Statement stmt;
    ResultSet rs;
    public admin_login_code() {
    initComponents();
    jPasswordField1.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    char c = e.getKeyChar();
    if (!(Character.isDigit(c) ||
    (c == KeyEvent.VK_BACK_SPACE) ||
    (c == KeyEvent.VK_DELETE))) {
    getToolkit().beep();
    e.consume();
    jFormattedTextField1.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    char c = e.getKeyChar();
    if (!(Character.isLetter(c) ||
    (c == KeyEvent.VK_BACK_SPACE) ||
    (c == KeyEvent.VK_DELETE))) {
    getToolkit().beep();
    e.consume();
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    jLabel1 = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    jFormattedTextField1 = new javax.swing.JFormattedTextField();
    jLabel4 = new javax.swing.JLabel();
    jPasswordField1 = new javax.swing.JPasswordField();
    jPanel2 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36));
    jLabel1.setForeground(new java.awt.Color(255, 0, 0));
    jLabel1.setText("ADMIN LOGIN");
    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24));
    jLabel2.setText("Admin Name");
    jFormattedTextField1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jFormattedTextField1ActionPerformed(evt);
    jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24));
    jLabel4.setText("Password");
    jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jPasswordField1ActionPerformed(evt);
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel1Layout.createSequentialGroup()
    .add(39, 39, 39)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jLabel4)
    .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .add(43, 43, 43)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPasswordField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
    .add(jFormattedTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel1Layout.createSequentialGroup()
    .add(47, 47, 47)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jFormattedTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .add(60, 60, 60)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jLabel4)
    .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jButton1.setText("Login");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jButton3.setText("Exit");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton3ActionPerformed(evt);
    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
    .add(38, 38, 38)
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 93, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 110, Short.MAX_VALUE)
    .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 93, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(55, 55, 55))
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel2Layout.createSequentialGroup()
    .add(38, 38, 38)
    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(30, Short.MAX_VALUE))
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(574, 574, 574)
    .add(jLabel1))
    .add(layout.createSequentialGroup()
    .add(459, 459, 459)
    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
    .addContainerGap(521, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(149, 149, 149)
    .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(43, 43, 43)
    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(42, 42, 42)
    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(250, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {
    private void jFormattedTextField1ActionPerformed(java.awt.event.ActionEvent evt) {                                                    
    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    Object src=evt.getSource();
    if(src==jButton3)
    dispose();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    Object src=evt.getSource();
    if(src==jButton1)
    admin_name=jFormattedTextField1.getText();
    password=jPasswordField1.getText();
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcle","scott","root");
    stmt=con.createStatement();
    rs=stmt.executeQuery("select admin_name,password from admin_registration where admin_name='chandana' and password='8989' ");
    while(rs.next())
    if(admin_name.equals(rs.getString(1))&&password.equals(rs.getString(2)))
    admin_registration a=new admin_registration();
    a.setVisible(true);
    dispose();
    else
    JOptionPane.showMessageDialog(null,"Please enter admin name & password ");
    catch(ClassNotFoundException e)
    e.printStackTrace();
    catch(SQLException e)
    e.printStackTrace();
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    admin_login_code a=new admin_login_code();
    a.setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JFormattedTextField jFormattedTextField1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPasswordField jPasswordField1;
    // End of variables declaration
    Can any one can help me how to set a background for jFrame?
    Thank you in advance.
    Edited by: forums.com on Jul 14, 2008 1:40 AM

    90% of the code you posted is not relevant to your question.
    If you want further help post a Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the problem.
    And don't forget to use code tags when posting code.

  • How 2 set the background color in j2me

    Can any body tell me how to set the background color to midlet.??

    if you are using Screen then you can call its setBackColor()
    or if you are using Canvas then you can call
    g.setColor(r,g,b);
    g.fillRect(0,0,getWidth,getHieght);
    where g is the Graphics instance of Canvas,for further information consult documentation

  • How to enable root on mac on 10.9.2 and how to set the password for the same ?

    how to enable root on mac on 10.9.2 and how to set the password for the same ?

    http://support.apple.com/kb/ht1528
    Follow the steps for Lion.
    But, why are you doing this? I've never found the need to do that.

  • TDMS : How to set the background colour programatically for .tdms file

    Hello every one 
    is there any method to set the background colour of .tdms file programatically
    Thank you
    Raja

    Hi Raja,
    "TDMS" is a file on your harddisc. How should a file have a background color?
    Or the other way around:
    How do you set the background color of a simple text file?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to set the header for second page

    Hello all,
    I'm trying to set different header for first page and page number should starts from second page.
    Below is the sample code to set the header for each and every page.
    DECLARE
    hApplication OLE2.OBJ_TYPE;
    hWindow OLE2.OBJ_TYPE;
    hPane OLE2.OBJ_TYPE;
    hView OLE2.OBJ_TYPE;
    hDocuments OLE2.OBJ_TYPE;
    hDocument OLE2.OBJ_TYPE;
    hSelection OLE2.OBJ_TYPE;
    hParagraphFormat OLE2.OBJ_TYPE;
    hRange OLE2.OBJ_TYPE;
    hFields OLE2.OBJ_TYPE;
    hFont OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    wdAlignParagraphLeft CONSTANT number(3) := 0;
    wdAlignParagraphCenter CONSTANT number(3) := 1;
    wdAlignParagraphRight CONSTANT number(3) := 2;
    wdSeekCurrentPageHeader CONSTANT number(3) := 9;
    wdSeekCurrentPageFooter CONSTANT number(3) := 10;
    wdSeekMainDocument CONSTANT number(3) := 0;
    wdFieldPage CONSTANT number(3) := 33;
    wdFieldNumPages CONSTANT number(3) := 26;
    wdPageBreak CONSTANT number(3) := 7;
    wdStory CONSTANT number(3) := 6;
    myTab CONSTANT varchar2(1) := chr(9);
    myBlue CONSTANT number(8) := 16711680; --FF0000
    myGreen CONSTANT number(8) := 65280; --00FF00
    myRed CONSTANT number(8) := 255; --0000FF
    myDkGreen CONSTANT number(8) := 32768; --008000
    myBlack CONSTANT number(8) := 0; --000000
    myText varchar2(2000);
    BEGIN
    hApplication:=OLE2.CREATE_OBJ('Word.Application');
    OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
    hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
    hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
    -------- Create Header and Footer --------
    hWindow := OLE2.GET_OBJ_PROPERTY(hApplication, 'ActiveWindow');
    hPane := OLE2.GET_OBJ_PROPERTY(hWindow, 'ActivePane' );
    hView := OLE2.GET_OBJ_PROPERTY(hPane, 'View' );
    ---- Header Section ---
    OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageHeader);
    hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
    hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Times New Roman');
    OLE2.SET_PROPERTY(hFont, 'Size', 10);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
    OLE2.SET_PROPERTY(hFont, 'Color', MyBlue );
    hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
    OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
    OLE2.RELEASE_OBJ(hParagraphFormat);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'This is a');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    OLE2.SET_PROPERTY(hFont, 'Size', 16);
    OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
    OLE2.SET_PROPERTY(hFont, 'Color', MyDkGreen );
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'Test Header');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    ---- Footer Section ----
    OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageFooter);
    hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
    OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
    OLE2.RELEASE_OBJ(hParagraphFormat);
    hFields := OLE2.GET_OBJ_PROPERTY(hSelection, 'Fields');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'Page ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG_OBJ(args, hRange);
    OLE2.ADD_ARG(args, wdFieldPage);
    OLE2.INVOKE(hFields, 'Add', args );
    OLE2.DESTROY_ARGLIST(args);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, ' of ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG_OBJ(args, hRange);
    OLE2.ADD_ARG(args, wdFieldNumPages);
    OLE2.INVOKE(hFields, 'Add', args );
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(hRange);
    OLE2.RELEASE_OBJ(hFields);
    OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekMainDocument);
    OLE2.RELEASE_OBJ(hView);
    OLE2.RELEASE_OBJ(hPane);
    OLE2.RELEASE_OBJ(hWindow);
    -------- Insert Text --------
    hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Arial');
    OLE2.SET_PROPERTY(hFont, 'Size', 12);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
    OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    myText := myTab || 'This text is on the ';
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, myText);
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
    OLE2.SET_PROPERTY(hFont, 'Color', myRed);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'first ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
    OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'page.');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, wdPageBreak);
    OLE2.INVOKE(hSelection, 'InsertBreak', args);
    OLE2.DESTROY_ARGLIST(args);
    ----page 2
    myText := myTab || 'This text is on the ';
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, myText );
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
    OLE2.SET_PROPERTY(hFont, 'Color', myBlue);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'second ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
    OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'page.');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    ---- go to the top of the first page
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, wdStory);
    OLE2.INVOKE(hSelection, 'HomeKey', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(hFont);
    OLE2.RELEASE_OBJ(hSelection);
    OLE2.RELEASE_OBJ(hDocument);
    OLE2.RELEASE_OBJ(hDocuments);
    OLE2.RELEASE_OBJ(hApplication);
    END;
    Please help me out
    Thanks,
    Bhavana

    Click on --
    Edit link for Page> Click "Edit Default" link on Banner >
    Under the "Banner Links"
    provide value something like this:
    Label = Help
    URL = /pls/portal30/docs/myhelp.html
    Icon = U can upload any icon here.
    For Application Components = See the Second Last tab on "Edit Component".
    Thanx,
    Chetan.

  • How to set the status for a customer plan to RELEASED.

    Hello all,
    I created a program for mass creation of customer plans. But after the creation of a plan, the status should be set to released, so that the user can go about creating the trade promotions for the customer plan. Can anybody tell me how to set the status of a customer plan to RELEASED.
    Thanks,
    Disha.

    Hi Clemens,
    I am not talking about doing it in the CRM_UI transaction..I created a program..which would create the customer plans based on the planning account data provided. I was succesfull in creating the plans, but I am not knowing how to release it, if only anybody can tell me about a Function module or method, which can help me do this, that would be great
    Thanks,
    Disha.

  • How to set the #HELPLINK# for a page

    I tried to find, how or where can I set the #HELPLINK# for each individual page/application component?

    Click on --
    Edit link for Page> Click "Edit Default" link on Banner >
    Under the "Banner Links"
    provide value something like this:
    Label = Help
    URL = /pls/portal30/docs/myhelp.html
    Icon = U can upload any icon here.
    For Application Components = See the Second Last tab on "Edit Component".
    Thanx,
    Chetan.

  • How to set the conditions for item deletion approval workflow?

    Hi,
    I have created approval workflow for item modifications ie, when user try to modify an item, it will send a mail to Project Manager. For that I set the conditions in Change the behavior of the overall task: 1. When the task process starts 2 . When the task
     process completes .
    Change the behavior of the single task: 1.when a task is Pending.
    [I followed this https://www.nothingbutsharepoint.com/sites/eusp/Pages/5-Steps-to-Enhance-SharePoint-2010-Approval-Workflow.aspx ]
    My Requirement is that I want to set this same workflow for the scenario: when the user deletes an item it will send a mail (intimation mail for item deletion) to Project Manager. here i dont want to send modification mails when user deletes an item.
    When user modifies an item: 1. intimation mail, 2. Approve/Reject mail 3. intimation for approval / rejection mail.
    When user deletes an item: 1. intimation mail.
    How can we set it in one approval workflow?? where i have to set the condition for sending either item modification mails or deletion mail.
    Thanks,
    Praveen ji

    Hi,
    According to your post, my understanding is that you wanted to start approval workflow when item deleted.
    You should first make some changes to trigger the workflow when you delete the item.
    You can use the Event Receiver to achieve it.
    In order to trigger workflow on item delete you need to create event receivers and from event receiver call the workflow already attached with list.
    http://ravendra.wordpress.com/sharepoint-workflow-on-list-item-delete/
    You can also create custom action to start the workflow, you can refer to the following article, then modify the workflow as your need.
    http://blogs.sharepoint911.com/blogs/jennifer/Lists/Posts/Post.aspx?ID=50
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to set the icon for the entire application with JFrame.setIconImage

    I set the icon on the main frame using JFrame.setIconImage(). The icon is shown properly in the main frame.
    If more JFrames are opened from the main frame, the newly opened JFrames also show the icon.
    However if JDialogs are opended, in some cases the icon set on the main frame is shown and in other cases the coffee cup.
    What is JFrame.setIconImage() expected to do? Setting the icon for a single JFrame or the entire application?
    How can I set the icon for the entire application?
    How can I set the icon for JDialogs?
    Thank you

    In order for your dialogs to use the same icon as the frame, you must parent the dialogs to the frame which has the custom icon.
    See the following thread for more information: http://forum.java.sun.com/thread.jsp?forum=57&thread=362542
    cheers,
    Greg

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

  • How to migrate the calendars for all users?

    At work we have two Mac servers, both running Mountain Lion. I'm looking for a way to migrate the calendars for all the users from server A to server B. I've recreated all the users on the new server, as there are problems with most users on the old server.
    I've seen some topics covering backing up calendar data on the server and seen some PostgreSQL related, but nothing seems to apply to Mountain Lion. How do I create a PostgreSQL dump of the calendars? I know I will have to edit the GUID's to make it work on the new server. Or is it as simple as copying the data from /Library/Server/Calendar and Contacts/ to the same location on the new server?

    At work we have two Mac servers, both running Mountain Lion. I'm looking for a way to migrate the calendars for all the users from server A to server B. I've recreated all the users on the new server, as there are problems with most users on the old server.
    I've seen some topics covering backing up calendar data on the server and seen some PostgreSQL related, but nothing seems to apply to Mountain Lion. How do I create a PostgreSQL dump of the calendars? I know I will have to edit the GUID's to make it work on the new server. Or is it as simple as copying the data from /Library/Server/Calendar and Contacts/ to the same location on the new server?

  • How to set the size for height of iView tray?

    Hi,
    I have created a ABAP webdynpro component and integrated this comp with iView. Then i integrated iView into Page in portal. That is working fine.
    But the size of tray/window which is displayed in the page is very small.
    How to increase the height of that Tray/window/iView containing my component?

    Hi,
    By changing the maximum automatic height and Minimum automatic height property of the iview you can set the size for height of your iview.
    to do this follow the setps:
    goto content administrator -> portal content -> your folder where you created your iview or directly to your iview -> right click -> open -> object,
    and now in property category choose appearance-Size from the drop down menu and set the above properties to your required height.
    if you want the end user to modify this property set the property to read/write .
    *********please reward points if the information is helpful to you********************

  • How to set the width for a selectManyShuttle component

    Hi,
    I'm using selectManyShuttle component from Oracle ADF Core and some of the items in the showing list are long, therefore the width of selectManyShuttle expands the page. How to set the width property for selectManyShuttle component? After that does selectManyShuttle provide horizontal scrollbar as well?
    Thanks in advance,
    lapi
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    Solution here:
    Re: ADF Faces Scrollable Panel or Scroll Bar inside a component
    Regards
    Grant

  • How to set toolbar options for all users in Reader

    Hi to everybody
    I have istalled adobe acrobat reader on a PC and i'd like to hide the toolbar for all user (old and new users) of thes PC.
    I'm using windows xp and acrobat reader 7.
    I have try to chek the user's folder and system registry but i don't find anything usefull
    How can I do that?
    Thanks
    Andrea

    Hi to everybody
    I have istalled adobe acrobat reader on a PC and i'd like to hide the toolbar for all user (old and new users) of thes PC.
    I'm using windows xp and acrobat reader 7.
    I have try to chek the user's folder and system registry but i don't find anything usefull
    How can I do that?
    Thanks
    Andrea

Maybe you are looking for

  • Price error - In creation of sales order

    Dear ALl, When i am trying to create a sales order with the t -code VA01 and enter a material i get a warning saying "000010:: Enter Pricing".This happens only for one customer ,for other customer with the same material there is no warning. Can some

  • Acrobat 9.5.5 multiple .pdf files open without toolbars displaying

    Recently, I noticed that, when I open one .pdf file, all toolbars I have selected as customized are displayed.  But, upon opening additional ,pdf files, those files do not display my toolbars at the top - only the file menu shows up.  If I try to clo

  • Customizing Graph View in OBIEE 11G

    Hi! I am using OBIEE 11.1.1.6. In line graph data labels in graph view are coming on the line so some values are not readable, we have to show values always How can we move the data labels above the line or below the line. I understand its differnt t

  • Gradient background not aligned correctly

    i have some photo pages and the gradient background is not aligned correctly - generally below where I want it - like on iweb shows correctly - but on web - it is below the navbar..... .... how do I control this? is this something to do with layout?

  • Error 4960 & Illegal Seek

    Hi, I have been downloading CS trial for a few days and now that it is almost complete, I am faced with the following error messages: DesignPremium_CS5_5 error - 4960 FlashPro_11_5_LS1.dm Illegal seek I've been reading threads and other forums for a