Background for JButton

Hi all I am doing design a background for JButton and also doing design a metal look and place this as
backgroung rather than using the plain colours eg black, red.
I dont want to use setIcon because I would like to place an Icon on top eg an arrow for previous or next..
Here is my sample code:
import java.awt.*;
import javax.swing.*;
public class JImageButton extends JButton
Image backgroundImage;
public JImageButton()
super();
public JImageButton( Action a )
super( a );
public JImageButton( Icon icon )
super( icon );
public JImageButton( String text )
super( text );
public JImageButton( String text, Icon icon )
super( text, icon );
public void setBackgroundImage( Image image )
MediaTracker mt = new MediaTracker( this );
mt.addImage( image, 0 );
try
mt.waitForAll();
backgroundImage = image;
catch( InterruptedException x )
System.err.println(
"Specified background image could not be loaded." );
public void paintComponent( Graphics g )
super.paintComponent( g );
Color saved = g.getColor();
g.setColor( getBackground() );
g.fillRect( 0, 0, getWidth(), getHeight() );
g.setColor( saved );
if( backgroundImage != null )
int imageX = ( getWidth() - backgroundImage.getWidth( this ) ) / 2;
int imageY = ( getHeight() - backgroundImage.getHeight( this ) ) / 2;
g.drawImage( backgroundImage, imageX, imageY, this );
if( !getText().equals( "" ) )
g.drawString( super.getText(), getWidth() / 2, getHeight() / 2 );
if( getIcon() != null )
Icon icon = getIcon();
icon.paintIcon( this, g, 10, 10 );
public Dimension getpreferredSize()
Dimension oldSize = super.getPreferredSize();
Dimension newSize = new Dimension();
Dimension returnSize = new Dimension();
if( backgroundImage != null )
newSize.width = backgroundImage.getWidth( this ) + 1;
newSize.height = backgroundImage.getHeight( this ) + 1;
if( oldSize.height > newSize.height )
returnSize.height = oldSize.height;
else
returnSize.height = newSize.height;
if( oldSize.width > newSize.width )
returnSize.width = oldSize.width;
else
returnSize.width = newSize.width;
return( returnSize );
And here's a tester to show how it works...
code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JImageButtonTest extends JFrame
JButton jb1, jb2;
JImageButton jib1, jib2, jib3;
Image backgroundImage;
ImageIcon icon;
public JImageButtonTest()
super( "Test for JImageButton" );
Toolkit tk = Toolkit.getDefaulttoolkit();
// Replace "someImage" and "anotherImage" with your own
// images...
backgroundImage = tk.getImage( "someImage.gif" );
Image iconImage = tk.getImage( "anotherImage.gif" );
icon = new ImageIcon( iconImage );
jib1 = new JImageButton( "Button 1" );
jib2 = new JImageButton( "Button 2" );
jib3 = new JImageButton( "Button 3", icon );
jib2.setBackgroundImage( backgroundImage );
jib3.setBackgroundImage( backgroundImage );
jb1 = new JButton( "JButton 1" );
jb2 = new JButton( "JButton 2", icon );
JPanel p1 = new JPanel();
p1.add( jib1 );
p1.add( jib2 );
p1.add( jib3 );
JPanel p2 = new JPanel();
p2.add( jb1 );
p2.add( jb2 );
getContentPane().add( p1, BorderLayout.SOUTH );
getContentPane().add( p2, BorderLayout.NORTH );
public static void main( String[] args )
JImageButtonTest jibt = new JImageButtonTest();
jibt.addWindowListener( new ExitHandler() );
jibt.pack();
jibt.setVisible( true );
class ExitHandler extends WindowAdapter
public void windowClosing( WindowEvent e )
System.exit( 0 );

Hi noamt3,
Please look this my test case's below it's working fine here.
import java.awt.*;
import javax.swing.*;
public class JImageButton extends JButton
Image backgroundImage;
public JImageButton()
super();
public JImageButton( Action a )
super( a );
public JImageButton( Icon icon )
super( icon );
public JImageButton( String text )
super( text );
public JImageButton( String text, Icon icon )
super( text, icon );
public void setBackgroundImage( Image image )
MediaTracker mt = new MediaTracker( this );
mt.addImage( image, 0 );
try
mt.waitForAll();
backgroundImage = image;
catch( InterruptedException x )
System.err.println(
"Specified background image could not be loaded." );
public void paintComponent( Graphics g )
super.paintComponent( g );
Color saved = g.getColor();
g.setColor( getBackground() );
g.fillRect( 0, 0, getWidth(), getHeight() );
g.setColor( saved );
if( backgroundImage != null )
int imageX = ( getWidth() - backgroundImage.getWidth( this ) ) / 2;
int imageY = ( getHeight() - backgroundImage.getHeight( this ) ) / 2;
g.drawImage( backgroundImage, imageX, imageY, this );
if( !getText().equals( "" ) )
g.drawString( super.getText(), getWidth() / 2, getHeight() / 2 );
if( getIcon() != null )
Icon icon = getIcon();
icon.paintIcon( this, g, 10, 10 );
public Dimension getPreferredSize()
Dimension oldSize = super.getPreferredSize();
Dimension newSize = new Dimension();
Dimension returnSize = new Dimension();
if( backgroundImage != null )
newSize.width = backgroundImage.getWidth( this ) + 1;
newSize.height = backgroundImage.getHeight( this ) + 1;
if( oldSize.height > newSize.height )
returnSize.height = oldSize.height;
else
returnSize.height = newSize.height;
if( oldSize.width > newSize.width )
returnSize.width = oldSize.width;
else
returnSize.width = newSize.width;
return( returnSize );
Here tester testcase:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JImageButtonTest extends JFrame
JButton jb1, jb2;
JImageButton jib1, jib2, jib3;
Image backgroundImage;
ImageIcon icon;
public JImageButtonTest()
super( "Test for JImageButton" );
Toolkit tk = Toolkit.getDefaultToolkit();
// Replace "someImage" and "anotherImage" with your own
// images...
backgroundImage = tk.getImage( "someImage.gif" );
Image iconImage = tk.getImage( "anotherImage.gif" );
icon = new ImageIcon( iconImage );
jib1 = new JImageButton( "Button 1" );
jib2 = new JImageButton( "Button 2" );
jib3 = new JImageButton( "Button 3", icon );
jib2.setBackgroundImage( backgroundImage );
jib3.setBackgroundImage( backgroundImage );
jb1 = new JButton( "JButton 1" );
jb2 = new JButton( "JButton 2", icon );
JPanel p1 = new JPanel();
p1.add( jib1 );
p1.add( jib2 );
p1.add( jib3 );
JPanel p2 = new JPanel();
p2.add( jb1 );
p2.add( jb2 );
getContentPane().add( p1, BorderLayout.SOUTH );
getContentPane().add( p2, BorderLayout.NORTH );
public static void main( String[] args )
JImageButtonTest jibt = new JImageButtonTest();
jibt.addWindowListener( new ExitHandler() );
jibt.pack();
jibt.setVisible( true );
class ExitHandler extends WindowAdapter
public void windowClosing( WindowEvent e )
System.exit( 0 );
I hope this will help you out.
Regards,
Tirumalarao
Developer Technical Support,
Sun Microsystems,
http://www.sun.com/developers/support.

Similar Messages

  • Setting backgrounds for JButtons

    Hello,
    As part of a team project, we have to design a Java version of Bejeweled. Our program has a 2-d array of 64 JButton's we're using to represent the jewels. I'm having difficulties changing the background color of these JButtons. When the user makes a set of 3, I'd like to set the background color of those JButton's to magenta for a brief time, to indicate that a set of 3 has indeed been made. In other parts of my program, the following works to set the background:
    image[i][j].setBackground(Color.green)
    This works just fine in several places. However, whenever I need to set the color of Buttons in the image array from outside of it's home class, the instruction is executed, but it simply doesn't set the appriopriate color. Any or all insight as to why this is happening is appreciated.

    Post the code?

  • Problem in Setting Background Color for JButton

    Hi,
    I am using Background color for JButton (color is selected from the customized JColorChooser created by us) where it contains the option of transparency. If we choose light color, then the background is set to JButton, but when we mouse-over the JButton, other components inside the container (JPanel) is getting displayed inside the button.
    Can anyone help to sort out this problem.
    Thanks in advance.

    Hi,
    Here is the code.
    DialogWrapper is JDialog and ColorEditorPane is JPanel.
    DialogWrapper     dlg         = new DialogWrapper();
    ColorEditorPane colorPanel = new ColorEditorPane();
    colorPanel.setValue( _data.getTransparentColor());
    dlg.showWrappedDialog( colorPanel, "color_help", "color_dialog" );
    if( dlg.isOK())
    Color chosenColor = (Color) colorPanel.getValue().getContent();
    _data.setTransparentColor( chosenColor );
    _transparentColorDisplay.setBackground( chosenColor );
    _transparentColorDisplay.setOpaque( true );
    this.repaint();
    this.doLayout();
    this.validate();
    }I've several components like JCheckBox, JRadioButton, JTextField in "this".

  • Set property for  background color for JButton

    I am attempting to change the colors of the UI for JButton. The change does not appear to be taking. The reason appears to be that JButton, and for that matter JLabel setOpaque(false); How can I globally change this to setOpaque(true);
    Second is there a way to save the default property hash table after the changes are made so that it will run the next time the program is executed.

    Thank you for responding. I don't feel that I have been clear in the statement of the problem. I have written a medium size desktop application(20,000 statements). I am trying to customize the color scheme by modifying the default laf properties color entries. I can modify JPanel through a put to the properties hash table. When I attempt to change the background color for JLabel and JButton it doesn't seem to take. I believe that the reason it doesn't take is because opaque(false). Is there a property that allows the overide of opaque to true or do I have to change all of the numerous JButtons in my program.
    I have decided to store all changes in a file and make the changes at the point that the program initializes each time its run.
    I am not looking for specific code but an approach.
    I would appreciate your advice.

  • 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 to run GR55 reports in background for cost center hierarchies

    1.  I have been asked by our users to create batch jobs to run in the background for some GR55 reports, that can then be sent directly to cost center managers via email.
    I have figured out the process to do this as long as the cost center manager only needs to see a single cost center at a time.  However, if they are in charge of multiple cost centers, we also want to send them a summarized report using the hierarchy we have set up.  I can't seem to make this work, as the job only seem to recognize the last cost center in the group and the report is for that cost center.
    Example.  cost centers 100, 200 and 300 belong to hierarchy abc.  If I run the job just for cost center 100 it is fine.  But if I have a variant to run hierarchy abc, or even if I use the range 100 to 300, all I get is a report for cost center 300.
    We cannot use BW because we only have revenue in BW.  I am being asked to make this work from standard R/3 within the GR55 realm of reporting.
    2.  In addition, the report selection criteria includes two separate plan/forecast versions.  They need to update these each month prior to running the reports and sending them out.  I looked at the variables associated with the versions and tried to set them up with default values that I hoped would update automatically so that they don't have to manually change 50 or so variants each month.  But I don't see any dynamic variables that I can use to have the system make that change without going into each variant individually.
    3.  There is another piece to this equation as well.  There is another report they want sent out in batch, but it is several pages wide in SAP and several pages long.  So when you run it in batch and either spool it or get it sent as an email, it is very ugly in the formatting due to all the page splits horizontally and vertically.  If anyone knows how to get the report to stay together like it would if you had excel integration turned on, it would be very helpful.  I have tried running it with that integration turned on, but the jobs are set up with user batch_mgr and not my id, so it isn't working well.  The batch_mgr id is just a system id, not a dialog id.  We also don't want the jobs set up with a regular user id because if people leave, then the jobs all need to be changed.

    Kim,
    I may have options for issues 1 and 2. In case of 3, what I can tell you is I understand the concern, but this is what  typically happens in some standard CO reports that are not ALV compatible, I don't think there is not much  there to do unless you add some custom code for the output.
    In regards to point 1, yes,  I have noticed that this happens in some standard and custom reporting, not sure what is going on. I came up with a work around that  made the trick for my client in a similar scenario; which is editing the cost center groups. For instance, instead  of having the group set as a range from 100 to 300,  the groups are have  listed the cost centers, 100, 200 and 300. Obviously, the disadvantage of  this option is  that it would require a bit of more cost center group maintenance.
    In regards to point 2,  I understand from your note  that your users already have set up selection variants for the report. One option for you is to get the help from a developer to create a custom period variable and tiny program that runs in batch every month that would update that variable accordingly. Once that's done, you may have to update at least once, the selection variant  attributes to change the period to a selection variable, so everytime from that point of time forward that the variable gets updated,  it will be ready with the right value for every selection variant that uses it.
    Hope this helps.
    GG

  • Using a different background for the drop down options in a spry menu bar

    Hi all,
    I am trying to set just a background color in the drop down menu, I have a background image repeated along the x asis at the top but this has come down into the sub menu bar how can I change just the lower drop down menu to just a solid color??
    I have tryed google and youtube to try to find a answer but have had no luck in finding the solution to this problem.

    Give a man a fish, you feed him for a day. Teach a man to fish, he eats every day…
    winabe23, you joined this month—probably because you were having trouble with CSS and HTML and you have certainly come to the right place.
    I'm going to send you to several places I have found helpful in understanding how you can make drop-down menus in CSS without the need for JavaScript—though JS may be necessary for certain older browsers that do not understand pseudo classes and may be necessary for the blind or keyboard navigation.
    CSS Wizardry has a great tutorial here.
    Line25 has one here.
    For those who don't want to have to wrangle code, here is a menu generator from PureCSSMenu.
    Here's a page by Eric Meyer who describes how the concept works.
    And here is a video tutorial by "zorro30mum." It's in two parts, but there is a link to Part 2 below Part 1.
    The reason why I am posting all of these links in my answer is because you're using Spry. And Spry has been found wanting by Adobe and they are deprecating and abandoning it.
    The Spry framework is an open source Ajax framework that Adobe developed. Ajax stands for Asynchronous JavaScript And XML. On August 29th 2012, Adobe handed over Spry to github. If you want to help github develop Spry, there is a site for that, but I'm thinking you're not a JavaScript developer.
    I would recommend you pay a little more attention and time to Ajax, which is not deprecated and not discontinued. It allows you to do client-side triggers for server-side code. But that's if you want to do work in JavaScript, XML and a server-side language, like Cold Fusion, php or ASP.
    But in the meantime, the tutorials above will get you into understanding how this whole menuing stuff is done in CSS and give you the understanding necessary to do simple stuff, like changing the color of a background for a drop-down.
    I hope this helps you make great websites!
    -Mark

  • Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent

    Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent backgrounds. Any thoughts?

    Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
    Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
    Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
    This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion.

  • How can I use a pic from iPhoto as a background for a page, How can I use a pic as a background for a page

    How can I use a pic from iPhoto as a background for a page, How can I use a pic as a background for a page

    cd,
    Insert the picture and position it as you desire
    Make sure the picture is set to Floating in the Wrap Inspector
    Arrange > Send Objects to Background
    Regards,

  • Custom CSS-Applying selected background for all the cols in the report

    Hi,
    I am trying to set a particular background for all the columns in the report(not for all the projects,so that I can avoid option of manually setting background color for complete report.For this I thought custom CSS is best option.So edited custom.css(C:\OBI11g_Middleware\Oracle_BI1\bifoundation\web\app\res\s_blafp\b_mozilla_4) file with below code and went to the Answers-> Criteria->Choose Column->style-> check "Use Custom CSS Class"->MyCell
    Code used in custom.css
    .MyCell { background-color: #00ff00; font-style:italic; font-weight: bold;}
    Somehow I dont see the background color applied to any of the columns in report.Can anyone had successful attempt of this Custom CSS.Thanks in Advance.

    I am trying both the solutions.
    User 979493,
    I started manually writing the code instead of pasting and almost worked.In the mentioned below paths I dont have custom.css file,so I created one and manually entered below code.But does it work for only that particular column and not for all the columns.Is it supposed to work for all the columns or just that column.
    For example: I have 2 cols in the report,I used "Use Custom CSS Class" -> MyCell for the first column and when I ran results it shows background color for only col1 and not for col2.I thought this feature will apply background color for all the columns in the report.Please correct me if I am wrong.
    custom.css file content:
    .MyCell{background-color: #00ff00;font-style:italic;font-weight:bold;}

  • Want to create an oval vignette in photoshop elements 10 with transparent background for printing w

    I am fairly new to PSE and I want to create an oval vignette in Photoshop Elements 10 with transparent background for printing on white paper using MS Publisher. Using the white background on inverse selection makes a slight line impression and either it should have a defined "frame" or nothing.
    Appreciate any guidance.

    Try with the Elliptical marquee tool:
    On the tool's option bar set feather 25-40 px (experiment)
    Drag out the Ellipse to embrace the object
    Go to Layer>new>layer via copy, or CTRL+J
    Your selection should fade out as a vignette and be surrounded by transparency
    Save this layer via File>save for web, select PNG-24, and tick "Transparency"

  • Is a script available to set a default background for email messages?

    I am new to the community, not to Mac though. Currently I am on a new MacBook Air, Lion installed.
    I had a couple of minor issues about mail, the first I solved myself using automator, and succeding in sending an attachment file from finder. It went on working also after the upgrade from snow leopard to lion.
    I could not find out how to set a specific default background for new email messages (e.g. a color, or a certain template); I do not want to do it everytime for each message. I tried automator, the workflows runs ok, tried to save it as service for mail and for finder but it did not catch; as application it works, but veeeery slow.
    When I pull down the mail window, the Services line says "no services available".
    Anyone who worked on this?
    thanks

    Hi ..
    That's not possible as yet but you can provide feedback to Apple here.

  • In Pages, how can I set a background for the whole document?

    I tend to regard Pages as more of a page layout program than a simple word processor, so I use it for stuff containing graphics as well as text. Now I want to put a kind of frame around every page in the document, and I want this frame to be effectively a background for everything else, with it being my responsibility for the remainder of the material to stay in the frame. I can't see any feature that allows this apart from Headers and Footers, and as far as I can see, these are not supposed to occupy the whole page, just the top and bottom.
    Can anyone give a good technique for configuring a background in this way?
    TIA

    This forum has helped me to partially answer my own question, in that I see now that I want to create a template with a section master that contains my graphic. But when I tried to do this, the menus for making a graphic (in my case a grouped item) part of a section master just didn't work. I am trying to follow the Help page "Using Master Objects (Repeated Background Images), but so far I can't get the menus to undim.
    Can anyone help?

  • I used a Photoshop file as my background for a brochure in InDesign CS6 and when I print it thru eit

    I used a Photoshop file as my background for a brochure in InDesign CS6 and when I print it thru either InDesign or via exporting it as a pdf it always has a white border.  How can I eliminate this?  I was on the phone with a tech for an hour and fifteen minutes.  The answer I was given is that InDesign places white borders automatically.  Need help, the white borders do not coincide with a mostly black background.

    I am not certain you understood the technical support person from wherever you shought help.
    ID will simply output what you tell it to. If you have designed a brochure that has a bleed and your PS file extends into the bleed, and you output a PDF with the correct settings, and send it to a service bureau (not certain about instyprint) that can print that size with bleeds, then trim it to size...phew. Seems like a run-on sentance there.
    As for printing to the edge of a piece of paper on a local printer that supports it, you need to set up the printer to do so. At least that's how it has worked with the borderless printers I have used.
    If you need an inexpensive brochure printed, try Quantum Digital. As long as you design it to their specs, it is a quick turn, the printing is fine for most inexpensive jobs, and they are pretty inexpensive. Offset quality they are not.
    But your file better be constructed properly.
    Take care, Mike

  • Different background for each space?

    Is it possible to have a different background for each virtual desktop space?

    Yeah the spaces functionality is severely lacking but I suspect it will be upgraded later down the road.

Maybe you are looking for

  • Problem with Sun Outlook connector Microsoft LDAP Directory MAPI Service Pr

    Dear All I have big problem with sun outlook connector and I can find any way to fix the problem, I am using sun java system connector deployment to create installation script for my clients. in the tool I have specify the location of Microsoft LDAP

  • Macbook running Windows 7 - How do I revert?

    Alright, so I'll just tell you the story from the beginning. My neighbor got a new computer, so she decided to give me her old Macbook. I decided to install Windows 7 on there because I am more comfortable with Windows than Mac. Unfortunately, I didn

  • Your Ipod Software Needs Updated

    Is there any way to kake this popup box stop asking me to update my software everytime I plug my Ipod in ? I downgraded to 1.0 version to fix my 60gb 5G video freeze problem. Now I have to wait for this stupid box to pop up and cancel it everytime. I

  • Answer: Constraints on a XlmSchema  for Tullio Bettinazzi

    : Sep 16, 2002 03:01 PT I've a quite complex XmlSchema. My problem is : I need to constraints some attributes depending of values of some other attributes. By example : if the attribute att1 is defined then att2 is mandatory otherwise is non allowed.

  • Where is the time signiture in my movie workspace?

    I have been an iMovie user since the first version, I use iMovie every week to edit video for my church.  I tried the newest version of iMovie this weekend and realized that the work area no longer shows the time signiture as I scroll through my vide