How to set tool tips for graphic objects.

Hi
i have a code like this
here dst is graphic object but i casted ti Graphic2D object because i have to set back ground color.
Graphics2D lGraphic = (Graphics2D) dst;
lGraphic.setBackground(Color.RED);
lGraphic.clearRect((int) lx, (int) ly, (int) lw + 1, (int) lh + 1);
lGraphic.drawRect(0, 0, (int) lw, (int) lh);
so now i want to set a tool tip for this lGraphic Object.
can any body please post answer for this proble.
if you will post in advance it will help me a lot.

so now i want to set a tool tip for this lGraphic Object.Your concepts are all wrong. Read the API for java.awt.Graphics and try to understand that a Graphics object is akin to a paintbrush: it has methods to draw whatever is to be drawn. The painting is not the brush, the brush does the painting.
To obtain a custom tooltip at certain locations within a JComponent, I think the easiest way is to override getToolTipText(MouseEvent me). The method can return null for locations where a tooltip is not to be shown.
db

Similar Messages

  • How to set Tool Tip Text to Tree Node?

    Hi,
    How to set Tool Tip Text to Tree Node in JTree?
    Pls somebody help me to solve it.

    bsampeieri,
    Been here a long time myself. I don't agree with the one post is enough per se. That is to say, sometimes, it helps to post in several groups so that more eyes may see it. A number of forum posters linger in specific forum topics and may not see the post in another forum.
    Now, if in the previous post you/others answered the question and then the OP posted here later, I could see the complaint.
    For the OP, the better way to cross-post is to have one "main" post, then have all the other posts refer back to that one (link to it) so that people aren't duplicating the effort to answer your question(s). A simple "I have cross-posted this to get more eyes on it. Please reply to this question at this post <link here>"

  • Howto set tool tip for a row in JTable

    I want to set a seperate tool tip for each of the rows in JTable. I tried getting cell renderer of all columns in a row and then setting tool tip for them. I expected that setting tool tip for a cell renderer will set tool tip for that cell. Thus setting tool tip for all the cells in a row will indirectly set tool tip for that row. But it does not happen that way. By setting a tool tip for a renderer it will use that tool tip for all those cells which use that renderer.
    Is there any problem in my approach or we cannot do this in Java.
    regards.

    Thanks.You're wellcome.
    >
    I just saw this method in JComponent and realized this
    solution.
    But then thought that for doing this i'll have to
    create my JTable class for just overiding one method
    thereby increasing one more level of abstraction.Well, you could override the method in an inner class if I understand you correctly in assuming that you don't want to create a JTable as new separate class. You could do this:
    JTable yourtable = new JTable() {
      public String getToolTipText( MouseEvent e ) {
        return getToolTipForRow( rowAtPoint( e.getPoint() ));
    // some where else in your class
    getToolTipForRow( int row ) {
      // determine your tooltip here
    }I think this would be a bit nicer and slightly faster approach because as far as I understand the getToolTipText() method is called after a similar MouseEvent for every JComponent i.e. a small pause of cursor movement over the component in question. I admit that I haven't tested either approach myself but noticed that JTable actually overrides the getToolTipText( MouseEvent e) method already. In your code you determine and set the tooltip every time the mouse moves. If you override getToolTipText( MouseEvent e) you have to determine the tooltip text only when the tooltip is actually about to be shown.
    Regards, JMorko

  • How to implement tool-tip for the list items for the Choice column in SharePoint 2013

    I had created a simple list with a "Choice" column, i have three entries in my drop-down, 
    First Entry
    Second Entry
    Third Entry.
    If i select any entries in drop-down and hour-over (Second Entry), a
    tool-tip need need to show. 
    Is it possible? If yes how to implement any help will be appreciated.

    Hi,
    We can use JavaScript to achieve it.
    The following code for your reference:
    <script type="text/javascript" src="/sites/DennisSite/Shared%20Documents/js/wz_tooltip.js"></script>
    <script type="text/javascript" src="/sites/DennisSite/Shared%20Documents/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript">
    $(function () {
    $("select[title='Choice']").change(function(){
    Tip($(this).val());
    $("select[title='Choice']").mouseout(function(){
    UnTip();
    </script>
    Download wz_tooltip.js:
    http://www.walterzorn.de/en/tooltip/tooltip_e.htm#download
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to get tool tip for ALV Contents.

    Hi,
    I have a ALV list with some data and Icons.
    When my mouse is on Icon,
    it should display a info text or tool tip,
    Any body help me?
    Best Regards
    Vinay.

    Hi Vinay
    Happy that you have solved your problem.
    I do not know which post has solved your problem. But you can give points to the posters by clicking the yellow star next to the post header to thank them. This is a part of SDN Contributor Recognition Program.
    You can give;
    many '2' points (Helpful answer)
    two '6' points (Very helpful answer)
    and one '10' points (Problem solved)
    For more information:
    https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    *--Serdar

  • How to set up permission for portal objects and folder

    Hi All,
    We are implementing EP 7.0. For creating portal objects, I have assigned "Super_admin, Content_admin, System_admin and User_admin" role to my userid and created iviews, roles and folder.
    During SAP audit they asked us to open a Iview to show the permission,   the below are the value shown in permission editor.
    Role Name           ====== Administrator ===== End  User ======Role Assigner
    Everyone             ======  Read            ======Yes        ====== No
    Super_admin_role ====== Owner            =====Yes         ======Yes
    SAP asked us to change the permission and said "Super_admin_role" should not be used, they asked us to create a group or role and assign. We are not clear what SAP wanted us to do.
    Can any one let me know how this permission needs to be given and whether "Super Admin" role can be assigned to a userid.
    Thanks in advance.
    Rgards,
    H.K.Hayath Basha.

    Hi Michael,
    I didn't create any role. I will let yo know what I have done so far.
    1. Created a group called "ADMIN_GROUP".
    2. Assigned "SUPER_ADMIN" role to group "ADMIN_GROUP.
    3. Assigned userid "ADMIN_USER" to group "ADMIN_GROUP".
    4. Opened the persmission of "PORTAL_CONTENT" folder and added group "ADMIN_GROUP" and set this group as "OWNER",  "END_USER" check box is ticked and "ROLE_ASSIGNER" check box is checked.
    5. Removed the role "SUPER_ADMIN" from  group "ADMIN_GROUP".
    6. Logged into portal using "ADMIN_USER" created a folder called "TESTING". Then opened the
        permission editor for the folder "TESTING", it showed three record
        "ADMIN_GROUP"           === OWNER  === 'X' === 'X'
        "EVERY_ONE"               === READ     === 'X' === ' '
        "SUPER_ADMIN_ROLE. === OWNER  === 'X' === 'X'
    7. I am not able to delete "SUPER_ADMIN_ROLE" from the permission editor, as it is greyed.
    With the above steps what I have achieved is I have given permission to group "ADMIN_GROUP". Is this what we need to do. Did I did anything wrong.
    Regards,
    H.K.Hayath Basha.

  • How to set command timeout for table object?

    I have a report that is generating an error during rendering in a CrystalReportViewer control (v10.5).  The error is "Failed to open a rowset." which appears to be caused by a timeout.  I'm currenlty setting the connection info and location of the sproc programmatically.  How can I set the command timeout as well?  Can I set this via the Attributes collection of the ConnectionInfo object?  (This appears to be a command timeout, not a connection timeout, which I'm already including in the Attributes collection of the ConnectionInfo object and setting at 15 seconds.  I've tried making this as much as 60 seconds but it doesn't change the behavior.)

    The error message includes text that states the timeout was exceeded (in bold below)...
    CrystalDecisions.CrystalReports.Engine.InternalException: Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Timeout expired
    SQL State: HYT00Error in File J:\DOCUME1\ADMINI1\LOCALS~1\Temp\SpecificationSummaryReport {42EDFEA3-DD0D-4F5E-BC0B-F9CC1126A872}.rpt:
    Failed to open a rowset. ---> System.Runtime.InteropServices.COMException (0x800002D3): Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Timeout expired
    SQL State: HYT00Error in File J:\DOCUME1\ADMINI1\LOCALS~1\Temp\SpecificationSummaryReport {42EDFEA3-DD0D-4F5E-BC0B-F9CC1126A872}.rpt:
    Failed to open a rowset.
    1)  Is there a Service Pack for CR 10.5???  That is the runtime that is in use - not XI.
    2)  The report viewer app is in version 10.5 (as mentioned in the first post) but the report was created in the designer for version 11.  Before we assume that is a problem - I have other reports created this way that work fine.
    3)  The data source is SQL 2005.
    4)  The connection type is OLE DB - Microsoft OLE DB provider for SQL Server.
    I think the issue is due to corruption in the report file.  I've seen this many times with reports (over the last 10 years).  I've had reports that refuse to work but if I recreate them from scratch the new report works fine.  In fact, I've recreated the data portion of this report (using the same sprocs) and that one works.

  • How to give tool tip for each button in Query Panel

    Hi All,
    I need to give tooltip on each button.For Search,Reset and Advanced buttons.
    Is there any way to give this.
    thanks,
    BM.

    Check if you find skin selectors for the query buttons.that's the only way of see. The query component comes as is ands allows changes mostly through skinning.
    Timo

  • How to set BDCDATA table for a SELECT-OPTIONS object?

    Dear experts,
    I have a transaction with PARAMETERS and SELECT-OPTIONS objects. This transaction will be called by another program by using CALL TRANSACTION 'mytransaction' USING mybdcdata statement. Below is some of the called transaction's source code:
    DATA:
      date TYPE sflight-fldate.
    PARAMETERS:
      p_carid TYPE sflight-carrid,
      p_conid TYPE sflight-connid.
    SELECT-OPTIONS:
      so_date FOR date.
    This is what I wrote in the calling program to define the values of the called transaction PARAMETERS fields:
    DATA:
      wa_bdcdata TYPE bdcdata,
      it_bdcdata TYPE TABLE OF bdcdata.
    wa_bdcdata-program = 'MYPROGRAM'.
    wa_bdcdata-dynpro = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO it_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'P_CARID'.
    wa_bdcdata-fval = 'AA'.
    APPEND wa_bdcdata TO it_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'P_CONID'.
    wa_bdcdata-fval = '017'.
    APPEND wa_bdcdata TO it_bdcdata.
    CALL TRANSACTION 'MYTRANSACTION' USING it_bdcdata.
    Unfortunately, I don't know how to set the values for the SELECT-OPTIONS screen fields. How to do this?
    I've Googled this and tried several guesses but none was found or successful. Thanks in advance.
    Regards,
    Haris

    Hi ,
      Better go for  SUBMIT report   instead of CALL transaction  ...
      find the name  of  report being called  on that transaction which you will be calling  . Use that report name in SUBMIT 
    Just take help from  below code .
    Before using do please read  by pressing f1 on SUBMIT  syntax .
    data:seltab     type table of rsparams,
             seltab_wa  like line of seltab.
        move: 'LANGU'  to seltab_wa-selname,
              'S'      to seltab_wa-kind,
              'I'      to seltab_wa-sign,
              'BT'     to seltab_wa-option,
              'D'      to seltab_wa-low,
              'I'      to seltab_wa-high.
        append seltab_wa to seltab.
        clear seltab_wa.
        move: 'E'      to seltab_wa-sign,
              'EQ'     to seltab_wa-option,
              'F'      to seltab_wa-low,
              space    to seltab_wa-high.
        append seltab_wa to seltab.
        clear seltab_wa.
        move: 'AUFNR' to seltab_wa-selname,
              p_aufnr to seltab_wa-low.
        append seltab_wa to seltab.
        clear seltab_wa.
        submit rkaep000  using selection-set 'VARIANT1'
                          with aufnr = p_aufnr
                          with selection-table seltab
                          exporting list to memory
                          and return .
    regards
    Deepak.

  • 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.

  • Tool Tip for VO attribute using Groovy

    Hi All,
    I was wondering how to use groovy for Tool Tip of a view object attribute.
    What I am basically looking for is return the String from a RowImpl class method and set it as a Tool Tip text.
    my method:
    public String applyToolTip(){
    return "This is my Tool Tip";
    Groovy used for Tool Tip Attribute
    adf.object.applyToolTip()
    also tried with,
    adf.object.viewObject.applyToolTip()
    None of them work. Also I tried writing the same method in VOImpl class. No luck.. Please help with explanation.
    Thanks.

    Hi,
    Groovy is not used throughout ADF BC. It can be used in validation and to define default values to an attribute but not for UI hints. For tool tips you would use message bundles (assuming your question is towards internationalization). Tool tips are defined on the AttributeDef of a View Object attribute and thus not defined per VO instance.
    Frank

  • Tool tips for selection list

    I want to display a tool tip for the values in a selection list in a HTML form in a JSP page. I have tried setting the title attribute on option tag but it does not work.
    Does anyone know how to do this?
    Thank you in advance

    bump

  • How to create tool tip in indesign skd?

    hi,
    Anyone suggest me, how to create tool tip in indesign skd?
    thanks,
    vijay

    Thanks for your reply, But i cannot able to set it in plugin menu.
    Please guide me
    Thanks,
    vijay

  • Tool Tip for a screen field.

    Hi,
    I have a step loop defined in a screen. I want to show tool tip for the each column. Please let me know how can i do it?
    I would really appreciate it.
    Regards,
    Sanjeev

    hi,
    &#56256;&#56452; If the meaning of a button cannot be perceived because of short or abbreviated label texts, a detailed description should be available in a tool tip.
    • To insert a tool tip, proceed as follows: In the Screen Painter element list, choose the “General Attributes” tab and the “Property List” column; or the “Properties” pushbutton in the “Layout” display on the “Attributes” window. Insert the “TooltipText” property to assign a tool tip. This function is only avail-able with R/3 Enterprise or Basis SP 44 (Release 4.6C) and higher.
    &#56256;&#56452; Always provide a tool tip on icon-based buttons.
    &#56256;&#56452; If a button contains both a text label and an icon, the button must have a tool tip that in-cludes the text description of the meaning of the icon. If the label text and the icon both convey the same information, no tool tip is required if the text is recognized by assistive technology.
    &#56256;&#56452; If a keyboard shortcut (e.g. Ctrl+F3) is available, add this information to the tool tip text.
    &#56256;&#56452; If a button handles the “Enter” keystroke, the button’s tool tip should provide this “Default Button” information.
    &#56256;&#56452; Recommendation: Important buttons provide an optional icon and a mandatory caption text. Align important buttons in the order in which they are read: in Western countries, the most important buttons are aligned left. Standard buttons (such as “Save”, “Back”, “Search”, “Next Object”, or “Previous Object”) should not have an additional caption text.
    Also chk this link:
    http://www.sapdesignguild.org/resources/Accessibility_Guideline_ABAP_external_Version.pdf
    regards,
    keerthi

  • Tool Tip for each JComboBox entry while moving mouse on them

    What is the best way to implement a different tool tip for each entry in the combobox. Moreover, while moving the mouse over any entry the tooltip should be visible.

    I'm not sure you can attach a tooltip to a JComboBox item, since these elements are not user interface elements, there may be anything(Integers, Strings, Icons,...). So how can you attach a tooltip to an Integer ?
    I mean, in a menubar, you can attach a tooltip to a menu item, because there's this user interface object called JMenuItem wich has a tooltip text propertyinfo... but what about items in a JComboBox ?
    I'm curious to know if this is possible.
    Diego

Maybe you are looking for

  • Data Back Up: N70 me

    I have downloaded latest PC software for my N70 me. I had to as I am using Windows Vista. But I am facing a peculiar problem when I try to back up files on my phone. When I try to back up data, the back up process stops at 40-50 per cent. Then I get

  • I'm getting an error message after importing a table through Dreamweaver into a page developed in Muse.

    I'm getting a couple of messages after importing a table through Dreamweaver into a page developed in Muse. I have compared the code of the page with the table with the page before I inserted the table and cannot find anything missing. the web addres

  • How can I save important sms's externally to my phone?

    hi i have an sms thread on my phone which is very long and is preventing me from being able to upgrade to the latest iOS due to the storage being used. however it is really important evidence to be used in court next year and I cannot delete the thre

  • Has Anyone Used Dell's New 23" SP2309W LCD Flat Panel?

    Good afternoon, I'm looking to buy a new external monitor for my soon to be purchased MacBook Pro 4,1 (Early 2008) model. I have also asked if anyone had any user info. about an Acer monitor, but no one replied. I'm serious about purchasing this new

  • Removing Help Icon

    We are trying to remove the help icon in the header, can someone provide the steps to do ths?