How to set stylesheet in my textarea

i have set htmltext property to my textarea and need to have stylesheet on textarea . How can I do it

you can use:
yourtextarea.textField.styleSheet=yourcss;
but you'll get an error message unless you bypass the drawTextFormat() method:
http://www.sharedknowhow.com/2008/07/fixed-flash-textarea-css-incompatibility/

Similar Messages

  • How to set text in a TextArea

    I have tried to find ways around this, but i must set text into a panel. but there is no .setText(), like there is for text fields. So how would i set text into a TextArea?
    BTW: what i am trying to do is be able to constatly add things without replacing what has been put up there.
    thank you

    BigDaddyLoveHandles wrote:
    sys5 wrote:
    I have tried to find ways around this, but i must set text into a panel. but there is no .setText(), like there is for text fields. So how would i set text into a TextArea?
    BTW: what i am trying to do is be able to constatly add things without replacing what has been put up there.
    thank youCould it be that you are not aware of the documentation?
    http://java.sun.com/javase/6/docs/api/
    By the way, JTextArea does have a setText method, but it replaces the current text with the given text. It sounds like you want to use ---- but wait, it's better if you find that out yourself. Big hint: it's the first method listed on JTextArea's API page.
    edit: too late!If he wasn't aware of the documentation, he probably would have tried using setText(), and found that it worked. That he thought it didn't exist suggests that he looked at the API but only looked in the method summary area, and not below at the "methods inherited from..." sections.
    (sorry to ruin your surprise)

  • How to set background color for textarea

    Hi all,
    I have created an application in Apex 3.2.
    I am now able to disable the text fields, select lists and textarea.
    Ex:
    function disableDD()
      var v_ddays              = document.getElementById("P2_DELINQUENCY_DAYS");
      v_ddays.value            = "";
      v_ddays.disabled         = true;
      v_ddays.style.background = '#cccccc';
    }The background color thing is working for all the text fields, but the same is not working with the textarea.
    Any help please....

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • How to swt scroll in the textarea?

    Hi to all.
    I can't figure out how to set scrollbars at my textarea text1.
    Can anyone help me out?
    Thanks in advance
    I attach her bellow my application:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.*;
    public class EDS_SIM
       JButton  button1 = new JButton(" EOTS SIMULATION");
       JButton  button2 = new JButton("METEO STATION SIMULATION");
       JButton  button3 = new JButton("Exit Simulation");
       JTextArea text1 = new JTextArea("SIMULATION PROGRAM STATUS.........",10,100);
       JTextArea text2 = new JTextArea();
       public EDS_SIM()
         super();
         //Create a panel as a container
         JPanel panel1 = new JPanel(null);
         Color mycolor=new Color(50,0,255,200);
         panel1.setBackground(mycolor);
         //Create a frame
         JFrame.setDefaultLookAndFeelDecorated(true);
         String title = "E . D . S .";
         JFrame frame = new JFrame(title);
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.setBounds(100,80,200,50);
         //setting an image to the frame
         Image icon = Toolkit.getDefaultToolkit().getImage("icona.gif");
         frame.setIconImage(icon);
         frame.add(panel1);
         text2.setBackground(mycolor);
         text2.setForeground(Color.WHITE);
         text2.setBounds(80,10,500,20);
         Font myfont=new Font("Verdana", 3,16);
         text2.setFont(myfont);
         text2.setText("PROGRAM FOR THE SIMULATION OF EXTERNAL DEVICES");
         text2.setEditable(false);
         panel1.add(text2);
         text1.setBackground(Color.BLACK);
         text1.setForeground(Color.WHITE);
         text1.setBounds(80,100,530,150);
         text1.setEditable(false);
         panel1.add(text1);
        button1.setForeground(Color.BLUE);
        button1.setBounds(80, 300, 200, 50);
        panel1.add(button1);
        button2.setForeground(Color.BLUE);
        button2.setBounds(350, 300, 260, 50);
        panel1.add(button2);
        button3.setForeground(Color.RED);
        button3.setBounds(460, 400, 150, 50);
        panel1.add(button3);
        Action_EOTS action1 =new Action_EOTS();
        Action_MS action2 =new Action_MS();
        ExitAction action3 =new ExitAction();
        button1.addActionListener(action1);
        button2.addActionListener(action2);
        button3.addActionListener(action3);
        // Create a horizontal progress bar
        int width = 650;
        int height = 500;
        frame.setSize(width, height);
        frame.setVisible(true);
        public class Action_EOTS implements ActionListener {
            public void actionPerformed(ActionEvent evt) {
                  button1.setEnabled(false);
                  EOTS eots_sim = new EOTS(text1);
                  text1.setText("EOTS Simulation is running\n");
         public class Action_MS implements ActionListener {
            public void actionPerformed(ActionEvent evt) {
                  button2.setEnabled(false);
                  MS eots_sim = new MS(text1);
                  text1.append("Meteo Sation Simulation is running\n");
      public class ExitAction implements ActionListener {
            public void actionPerformed(ActionEvent evt) {
                 System.exit(0);
       public static void main(String argv[])
          EDS_SIM window = new EDS_SIM();
    }import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class EOTS
    JButton button3 = new JButton("Close Simulation");
    //Create a frame
    String title = "EOTS SIMULATION";
    JFrame frame = new JFrame(title);
    JTextArea text12 = new JTextArea();
    public EOTS(JTextArea text1)
    //Create a panel as a container
    JPanel panel1 = new JPanel(null);
    Color mycolor=new Color(0,0,150,200);
    panel1.setBackground(mycolor);
    //Create a frame
    JFrame.setDefaultLookAndFeelDecorated(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setBounds(50,600,80,50);
    //setting an image to the frame
    Image icon = Toolkit.getDefaultToolkit().getImage("icona.gif");
    frame.setIconImage(icon);
    frame.add(panel1);
    button3.setForeground(Color.RED);
    button3.setBounds(200, 100, 200, 50);
    panel1.add(button3);
    text12=text1;
    text12.setAutoscrolls(true);
    ExitAction action3 =new ExitAction();
    button3.addActionListener(action3);
    // Create a horizontal progress bar
    int width = 500;
    int height = 200;
    frame.setSize(width, height);
    frame.setVisible(true);
    public class ExitAction implements ActionListener {
    public void actionPerformed(ActionEvent evt) {
    frame.setVisible(false);
    // If the frame is no longer needed, call dispose
    frame.dispose();
    text12.append("EOTS HAS FINISHED THE SIMULATION\n");
    text12.append("0123456789qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm0123456789\n");
    text12.append("3\n");
    text12.append("4\n");
    text12.append("5\n");
    text12.append("6\n");
    text12.append("7\n");
    text12.append("8\n");
    text12.append("9\n");
    text12.append("10\n");
    text12.append("11\n");
    text12.append("12\n");
    text12.append("13\n");
    text12.append("14\n");
    text12.append("15\n");
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MS
       JButton  button3 = new JButton("Close Simulation");
       //Create a frame
         String title = "MS SIMULATION";
         JFrame frame = new JFrame(title);
         JTextArea text12 = new JTextArea();
       public MS(JTextArea text1)
         //Create a panel as a container
         JPanel panel1 = new JPanel(null);
         Color mycolor=new Color(0,0,150,200);
         panel1.setBackground(mycolor);
         //Create a frame
         JFrame.setDefaultLookAndFeelDecorated(true);
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.setBounds(600,600,400,50);
         //setting an image to the frame
         Image icon = Toolkit.getDefaultToolkit().getImage("icona.gif");
         frame.setIconImage(icon);
         frame.add(panel1);
        button3.setForeground(Color.RED);
        button3.setBounds(200, 100, 200, 50);
        panel1.add(button3);
        text12=text1;
         text12.setAutoscrolls(true);
        ExitAction action3 =new ExitAction();
        button3.addActionListener(action3);
        // Create a horizontal progress bar
        int width = 500;
        int height = 200;
        frame.setSize(width, height);
        frame.setVisible(true);
      public class ExitAction implements ActionListener {
            public void actionPerformed(ActionEvent evt) {
                frame.setVisible(false);
                // If the frame is no longer needed, call dispose
                frame.dispose();
                text12.append("METEO STATION HAS FINISHED THE SIMULATION\n");  
    }

    Put the JTextArea into a JScrollPane.

  • How to set the default Excel cell format when opening XML to XLS using an existing stylesheet​?

    Hi,
    I have an XML file, which I'm opening with the Excel application. The stylesheet I use is horizontal.xsl.
    The problem arised when the XML has data in the format "1/4" or "1/16", which is translated in the Excel as date (like "01/04/2007").
    I think I have to set the default cell type to "Text" instead of "General". Does anyone know how it can be done?

    Is this the same question as idoZo, if so jigg has already answered it. If not then you should post your own query not hijack someone elses giving a clear and concise question, "how to set it??" doesn't help you or other in the forum to provide you with a solution.
    Is this relevant to TestStand? If it is then help by providing which version you are using and what software you are using with it. If not then post your question in the correct board.
    Regards
    Ray Farmer

  • How to set Telugu(my own)  font to  AWT TextArea

    Hi,
    I have a Telugu Font file(.TTF file). I have installed that .TTF file in my system.
    Now i want to set that font to AWT TextArea.
    can any body tell how can i solve tha above problem
    --bala                                                                                                                                                                                                                                                                                                                                                                                                   

    i tried it , but it does'nt work.
    but what exactly i want is , i have a font(.ttf). i want to set that font to textarea.
    --bala                                                                                                                                                                                                                                                                   

  • 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 set buildID.xml and custom.properties in SDK

    Hello,
    I just completed a new build deployment of SAP ME5.2, because after I deployed the new version, I don't think I have set a
    correct version number.Can you someone give me a sample how to set the buildID.xml and custom.properties? I am a new on the SAP ME5.2
    The Base version is ME_Base_5.2.5.16.5_netweaver-71_Update.zip and
    MEClient_Base_5.2.5.16.5_netweaver-71_Update.zip. the HB customzation
    version is ME_xxxxxx_2.0.0.0.x_netweaver-71.
    Within the sap note 1484551, you mentioned we need change the
    SDKInstallDir/build/buildID.xml file, here is the context of the file:
    buildID.xml -
    <?xml version="1.0" encoding="UTF-8"?>
    <buildID xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <customer>XXXXXX</customer>
    <revision>1.0.0.0</revision>
    <build>1</build>
    </buildID>
    buildID.xml -
    1. how can we change the revision and build?
    There is another file BuildToolDir/build/script/custom.properties, here
    is the file context:
    custom.properties----
    This file contains build properties used to configure the build
    system.
    The name of the software vendor implementing the customizations.
    vendor.name=xxxxxxxxx
    Vendor build identifier. This value is used to uniquely identify
    customizations built by a particular vendor for a particular customer
    and base
    application version.
    This is also used in path locations and in naming certain build
    artifacts, like the custom EJB module and the utility classes archive.
    vendor.id=xxxxxxxxx
    The installation of the J2EE engine installed in the development
    environment.
    ex. C:/usr/sap/CE1\J00
    j2ee.instance.dir=J2EEInstanceDir
    The web context path used to access the main web application. This
    is used by the build to set the
    context-root value in application.xml after an update has been
    imported.
    web.context.path=
    The web context path used to access the production XML interface web
    application. This is used by the build to set the
    context-root value in application.xml after an update has been
    imported.
    xml.context.path=
    The web context path to access resources from the web extension
    application, like images and work instruction HTML files.
    web-ext.context.path=web-ext
    The target database vendor. Valid values are 'oracle' or 'sqlserver'.db.vendor=ORACLE
    The JDBC driver configured for the application server.
    db.drivername=VMJDBC
    JDBC connection propertes for the WIP (Work In Process) database.
    This is the primary application database.
    db.wip.driverclassname=
    db.wip.driver.url=
    db.wip.host=
    db.wip.port=
    db.wip.sid=
    db.wip.user=
    db.wip.password=
    JDBC connection propertes for the ODS (Open Data Store) database.
    This is the offline reporting and archiving database.
    db.ods.driverclassname=
    db.ods.driver.url=
    db.ods.host=
    db.ods.port=
    db.ods.sid=
    db.ods.user=
    db.ods.password=
    Flag indicating whether to add DPMO NC codes to NC idat files when a
    new update is imported. This value is initially
    set by the installer according the the user selection.
    dpmo.nc.codes=
    The default locale used by the production system. The default locale
    is the locale used to display locale
    specific text and messages when the requested locale is not
    available. This property does not need to
    be set if the default locale is english.
    default.locale=en
    Used when running the build from Eclipse to locate the java compiler
    used by the WebLogic EJB compiler.
    jdk.home=C:/Program Files/Java/jdk1.5.0_20
    Compiler debug mode. If set to 'true', debug symbols will be
    compiled into the byte code.
    compile.debug=true
    Keystore alias
    security.alias=xxxxx
    Keystore password
    security.storepass=ChangeIt
    Key password
    security.keypass=ChangeIt
    Keystore type (jks=default,jceks,pkcs12)
    security.storetype=jks
    Optional source control build identifier that is to be displayed with
    standard version information.
    scs.build.ID=
    Optional extended version information to be displayed with standard
    version information.
    ext.info=
    custom.properties----
    2. How can we change this here?
    Regards,
    Leon Lu
    Edited by: Leon Lu on Aug 4, 2011 11:14 AM
    Edited by: Leon Lu on Aug 4, 2011 11:21 AM

    Hi,
    I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
    You can do this in compound layout.
    Regards,
    Stefan

  • How to set up and auto-mirror a networked drive?

    So here's the situation.  I currently have a MBP Retina 15 (max spec'd), and there are some design processes that still run a little slow for my liking.  Given that I spend about half my working life at a desk plugged into a monitor anyway, I figured I'd get a Mac Pro to use when I'm in the office.
    What I need help with is how to:
    -Set up an external networked drive so that I can open and save all my projects to the same place regardless of which machine I'm working on.  I spend 90% of my laptop working time at home on the same network.
    -Have the networked drive auto-back up to another external storage device so that in case of HD failure.  Basically I want to save a file, and have it expeditiously (ideally instantly, but the sooner the better) back up to the secondary HD. 
    Somebody at the Apple Store suggested using a USB HD plugged into Airport Extreme, and that would work, I suppose, but
    1) I'd really prefer something plugged in to the Mac Pro to speed up the data transfer at least one one machine.
    2) There's only 1 USB port on the Airport Extreme.  So if we were to go this way, the back up mechanism would need to be built in to the drive -- some sort of double external HD that auto-mirrors.
    Any suggestions?

    Could you use textarea?
    sym.$('inputfiled').html('<textarea cols="20" rows="3"></textarea>);
    actually the form I used in the file is:
    inputMessage = $('<textarea />').attr({'type':'textarea','rows':'10', 'cols': '25','value':'', 'id':'message'});

  • How to Align Text in the TextArea

    How to Align text in the TextArea. My purpose is that I want to post the records after retrieving from database. All the records in each fields should keep aligned like Oracle WorkSheet.
    I want this way
    Code Name Place City
    a01 nilopher swiss street japan
    a02 rozina lovely street aus
    a03 benazir king's camp pitsburg
    and the out put should not look like this :-
    Code Name Place City
    a01 nilopher swiss street japan
    a02 rozina lovely street aus
    a03 benazir king's camp pitsburg
    here place and city records are getting disturbed accordingly the length of name.

    Well, first off (if it's not default, that is) you must set a monospaced font on the TextArea, unless you want to count pixelwidth of each and every string and then do an estimate on how many fill blanks you want...
    If you have the each string as a line, you use a StringTokenizer on it, extract each token, put all the tokens for that line into an array of strings.
    When every line is done, you compare the length of the nth String of each array and save the highest numbers.
    Then you reassemble each line from the arrays and pad in spaces where the tokens are too short.
    HTH,
    Fredrik

  • How to set max rows in flowed textfield?

    Is there a way to limit the rows allowed to input on a flowed textarea? I now we can limit the length of max chars, but that would not help me.

    Hi Rishit,
    Thanks for your answer!
    Had a long holiday, so didn't give a feedback in time. Sorry for that!
    There is a tab 'Controls' in Universe Parameter, where there is a setting used to limit the size of result set.
    Then what's the priority between this setting and the similar setting in WebI query properties?
    However, acutally my question is how to set the limitation by user security profile in CMC.
    Do you have any idea about it?
    Qing
    Edited by: Qing Zhou on Jun 21, 2010 11:12 AM

  • How to set up connection between S and C

    I want to realize a chat between server and client.
    on both side ,there is a textArea to get the information to send to the other.
    I know the socket is must be used,but how to set up the data source(from textarea or textfield),and how to store the data?
    can some one tell me how to do this?
    thanq!

    So what are you saying you dont know how to use the textarea and textfield?Cause it is ez to convert that code that dunedinhigh gave you from console to a gui like what you want I think.So here is a link that shows you how to use text component.You learn this then you can put 2 and 2 together.Also check out the java tut page.
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/docs/books/tutorial/uiswing/components/simpletext.html
    good luck

  • How to set width of a TextField ?

    Hi all,
    I want to use Polish in my javaME code , so I add //#style style_name before calls of constructor TextField.
    The problem is that when I run the application then the textfield is very small in width ! And when I try to enter a value inside then a big textarea is shown in the screen in which I enter the value ; and after that I click the "Ok" command item and I finally return to my form.
    I use a polish.css file to define the style.
    So how to set a width for a TextField ?
    Thank you very much indeed

    never mind. I forgot a line in my layout manager.

  • How to set cursor in a component by default

    Hi all,
    Does anybody know how to set the cursor inside a textArea? or at any particular component of a frame?
    Thanks in advance.

    textAreaObj.requestFocus() doesn't do it?
    If that doesn't do it, then try textAreaObj.setSelectionStart(0).
    You may have to force a repaint(), possibly, as well.

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

Maybe you are looking for

  • SAPSQL_ARRAY_INSERT_DUPREC during saving of Process Chain

    Dear all, On saving, when adding a process to an existing Process Chain - like Rollup or Change Run - in our SCM 5.0 system, we receive a short dump 'SAPSQL_ARRAY_INSERT_DUPREC' (complete short dump at the end of the msg). A problem arose on the line

  • Copying or cloning question...

    I'm upgrading my MBP with a bigger hard drive this weekend. I know of a couple of recommended programs to 'clone' my HD (Carbon Copy Cloner and SuperDuper) my question is: Do these programs actually make an identical copy (clone) of the source, compl

  • Windows Mobile 5.0 L2TP/IPSec native VPN to 3030

    Has anyone successfully setup a VPN using the built in VPN client in Windows Mobile 5.0 to a Cisco 3030? I am running into problems but have no idea why. I followed chapter 13 of "The Complete Cisco VPN Configuration Guide" from Cisco Press, to confi

  • Loading child SWFs with TLF content (from Flash CS5.5) generates reference errors in FB4.6

    I am currently producing e-learning content with our custom AS3-Framework. We normally create content files in Flash CS5.5 with dynamic text fields, which are set at runtime from our Framework (AS3 framework in FB4.6). Now we are in the progress of l

  • Problems seeing wireless networks

    Hello, I am having some problems getting my room mates power book onto wireless networks. I created a wirelss network with my linksys router then when i look for the network under the airport signal icon i see no networks so I select to join "other"