Using text in a GUI without using .swing classes

In a Java application, is there any way to create a text object that can be positioned in a GUI like an ImageIcon (using a class from the standard Java API)? For example, when using ImageIcon, you feed the x and y-coordinates, whereas with .swing, you'd have to create a new panel, position the panel, and re-position the panel using BorderLayout.(direction).
Ex. (with ImageIcon, you'd place it like so):
//construct ImageIcon w/ URL
ImageIcon myImage = new ImageIcon(new URL("http://..."));
//x and y are pixels to the right and to the bottom from the top left corner
myImage.paintIcon( (Component), (Graphics), x, y);
//I'm looking for one that does the same, like this (without using an image, preferrably), TextMessage is what the class might be:
TextMessage myText = new TextMessage("Here is some string to print out");
myText.printText( (Component), (Graphics), x, y)

or you can paint a string, like this
public void paint(Graphics g) {
     super.paint(g);
     g.drawString("Hello World!", x,y);  // replace x, y with your own coordinates
}hope that helps

Similar Messages

  • Is there a way to text someone on iMessage without using your number on an iphone

    is there a way to text someone on iMessage without using your number on an iphone ? there's someone i want to text but it's long distant an ik not sure about giving my number to them just yet. so is there a way to send them a message from iMessage on my iPhone rather then using my number  ? please let me know ASAP !

    Sending an iMessage with your phone number does not matter whether it is long distance phone call or not. That has no bearing on how iMessage works. iMessages from the phone that is activated with the phone number will send from the phone number.

  • Can I create an apple id that my mother can use to download free books without using my personal apple id that I used when set her ipad up with originally?

    Can I set up another user id that my mother can use to download free books without using my personal apple id that I used to set up her ipad with originally?

    Other options:
    Download the Amazon Kindle app and set your mother up with an Amazon account.  Amazon has a lot of free ebooks.
    Many public libraries allow you to check out audio and ebooks using the Overdrive app.

  • Create database table using Forms Developer 6/6i without using SQL*Plus

    hello there,
    I need help in creating tables in Oracle using Forms Developer 6/6i without using SQL*Plus interface.
    your help is appreciated
    email: [email protected]

    please use Forms_ddl package to create a table dynamically
    from the Developer6/6i.
    you can check the success or failure by using the
    form_success builtin.
    if u want to avoid using the Forms_ddl package
    use stored procedure or create a sql querry record group.
    regards
    sriram.

  • Dynamic text in PI Alerts without using BPM

    Hello everyone,
    Is it possible to have dynamic text in alert mail subject or mail details without using BPM in PI?
    If I want to configure generic single alert category for all interfaces in my project , and in the subject line of Alert mail, I need to have the Interface ID (unique identifier for that interface) or integration directory scenario name for which this alert has been raised, then is it possible to use some custom alert container for this purpose?  Or is there any other way to have these dynamic texts ?
    We are using PI7.1 in project landscape.
    Thanks in advance,
    Minal

    Hi,
    >>I need to have the Interface ID (unique identifier for that interface) or integration directory scenario name for which this alert has been raised
    those two are not available in the container:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/d0/d4b54020c6792ae10000000a155106/content.htm
    Regards,
    Michal Krawczyk

  • Help in making this GUI without using IDE (snapshot attached)

    [Layout image| [https://rapidshare.com/files/2954811682/layout.JPG]]
    hi, i am new java swing library and i want to create a layout just like a image posted above without using IDE.
    i need some idea/help regarding two issues which i m facing at the moment one how to set the size of the button and how im suppose to set the alignment of labels,textboxes and buttons according to the image here is the source code below :
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.Font;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JCheckBox;
    import javax.swing.JComboBox;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.border.TitledBorder;
    public class Form extends JFrame {
    private JLabel lblUserName;
    private JLabel lblNewPassword;
    private JTextField txtUserName;
    private JPasswordField txtNewPassword;
    private JButton btnLogin;
    private JButton btnClear;
    private JPanel mainPanel;
    private JPanel centerPanel;
    public Form() {
    // initialize the components
    initComponents();
         // add the components
    addComponents();
         // add the listeners
    //addListeners();
    // display components
    displayComponents();
    private void initComponents() {
    getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
    mainPanel = new JPanel(new BorderLayout());
    centerPanel = new JPanel(new GridLayout(3, 4, 20, 5));
    lblUserName = new JLabel("Username : ");
    lblNewPassword = new JLabel("password : ");
    txtUserName = new JTextField(15);
    txtNewPassword = new JPasswordField(15);
    btnLogin = new JButton("Login");
    btnLogin.setPreferredSize(new Dimension(2,2));
    btnClear = new JButton("Clear");
    btnClear.setPreferredSize(new Dimension(2,2));
    private void addComponents() {
    centerPanel.add(lblUserName);
    centerPanel.add(txtUserName);
    centerPanel.add(new JLabel(""));
    centerPanel.add(lblNewPassword);
    centerPanel.add(txtNewPassword);
    centerPanel.add(new JLabel(""));
    centerPanel.add(new JLabel(""));
    centerPanel.add(btnLogin);
    centerPanel.add(btnClear);
    Font titleFont = new Font("San Serif",Font.PLAIN,12);
    Color titleColor = Color.blue;
    mainPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Admin Login",TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION,titleFont,titleColor));
    mainPanel.add(centerPanel, BorderLayout.CENTER);
    getContentPane().add(mainPanel);
    private void displayComponents() {
    setTitle("Form");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(600, 200);
    setVisible(true);
    public void actionPerformed_BtnUpdate(ActionEvent e) {
    JOptionPane.showMessageDialog(this, "Your profile has been updated successfully.");
    public void actionPerformed_BtnBrowse(ActionEvent e) {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.showOpenDialog(this);
    public static void main(String[] args) {
    try {
    Form myForm = new Form();
         catch (Exception exception) {
    System.err.println("ERROR - " + exception.getMessage());
    Edited by: 932179 on May 4, 2012 1:30 PM
    Edited by: 932179 on May 4, 2012 1:30 PM

    Welcome to the forum.
    Take the list of +"All Known Implementing Classes"+ from here http://docs.oracle.com/javase/7/docs/api/java/awt/LayoutManager.html and find out what combination best fits your needs.
    I usually have some nested BorderLayouts and GridLayouts.
    When I need lables and input fields aligned I use GroupLayout (which I personally prefer over GridBagLayout...).
    Anyway, you may have got better answers if you postet this in the right place:
    Swing
    bye
    TPD

  • Can I use iWork '09 on Lion without using new Lion features?

    I do not wish to use the new features in Lion, primarily autosave, with iWork, at least initially.  In other words have iWork act as it would in S.L.   However, I need to purchase iWork in order to continue using a bunch of Appleworks spreadsheets.  I am using a new MBP with OS 10.7.1.  My plan is to purchase the hard copy iWork '09 from the Apple Store (the AppStore download versions have already been updated).  This CD should be some version of 9.0 as they have not put 9.1 on the CD.  My idea is to just not let the modules (Numbers, Pages, etc.) get updated until I am ready.  My question is -- will Numbers and Pages work properly on Lion without using the final update to the new Lion Features, and which updates to Numbers and Pages should I avoid?
    Any help is appreciated. 

    Sjazbec wrote:
    Resume can be disabled systemwide in Systemsettings, general section.
    Alas, it's reactivated when we shutdown if we don't take care to uncheck the dedicated box.
    More, if we ask to restart on an other device, we have no checkbox available to disable Resume.
    Happily, it seems that pressing option during the shutdown process disable the beast.
    Yvan KOENIG (VALLAURIS, France) vendredi 16 septembre 2011 18:49:31
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Use HCM processes and Forms without using the Enterprise Portal

    is it possible to leverage existing HR Admin Services (HCM processes and Forms) functionality without using the Enterprise Portal?
    1) Create an Adobe form and Interface using SFP
    2) Set up ISR and Form Scenario
    3) Set up Forms configuration to use existing Backend and generic Services
    4) Set up workflow to updated Backend using Services
    is it possible to do the above steps and not use the Portal? If Yes, how do we present the forms to the Manager, and provide different buttons that appears on the Portal by default?
    Any ideas will be greatly appreciated.
    Thanks,
    Saurabh

    Hi Saurabh,
    your assumptions and findings (items can not be started from the backend workflow inbox etc.) are correct: These processes can not be started without the Portal and it is not intended to do this.
    The above mentioned backend report are only forseen for implementation and testing purposes and not for productive use.
    In addition to the fact, that you already can't execute the work items a lot of other features of the framework (Process Browser etc.) are only available through the Portal.
    Best Regards
    Michael Bonrat - Solution Manager HCM Processes and Forms
    Info about HCM Processes and Forms:
    www.service.sap.com/erp: 
    - SAP ERP Human Capital Management -> Workforce Process Management -> HCM Processes and Forms

  • Using Refcursor in Callable Statement without using the Oracle Drivers

    Hello all,
    Is there anyway to have a stored procedure (Oracle 8i) return a refcursor to my CallableStatement without using the Oracle Thin drivers (i'm now using jdbcodbc). I've tried registering my out parameter with every possible type i can think of...REF, JAVA_OBJECT, OTHER, etc. but with no luck.
    Help!!!!

    Certainly...I connect to the database using the
    jdbcodbc driver and when i execute any of the code, i
    get the following error:
    java.sql.SQLException: [Oracle][ODBC][Ora]ORA-06550:
    line 1, column 7:
    PLS-00306: wrong number or types of arguments in call
    to 'PVISUAL_GET'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It's bombing on the line that i attempt to register
    OracleTypes.CURSOR. It works fine when i use the
    oracle thin drivers, but i want to get this puppy
    working with the JdbcOdbcDriver. Here's the code:
    CallableStatement dbCall =
    nt dbCall =
    (CallableStatement)connection.prepareCall("{ call
    PAK_VISUAL_GET.pvisual_get(?, ?, ?, ?, ?, ?) }");
    dbCall.setString(1, sessionKey);
    dbCall.setInt(2,
    l.setInt(2, Integer.parseInt(storedVizID));
    dbCall.registerOutParameter(3,
    arameter(3, OracleTypes.CURSOR);
    dbCall.registerOutParameter(4,
    arameter(4, OracleTypes.NUMBER);
    dbCall.registerOutParameter(5,
    arameter(5, OracleTypes.VARCHAR);
    dbCall.registerOutParameter(6,
    arameter(6, OracleTypes.NUMBER);
    dbCall.execute();when you don't use oracle thin driver, you cannot use the OracleTypes. but, instead use the java.sql.Types values.Replace dbCall.registerOutParameter(3, OracleTypes.CURSOR); with
    dbCall.registerOutParameter(3,java.sql.Types.OTHER). things should be fine.
    Ganesh

  • Inserting multiple rows using a single Insert statement without using dual

    Hi all,
    i am trying to insert multiple rows using a single insert statement like the below one.
    The below one works fine..
    But is there any other change that can be done in the below one without using dual...
    insert all
    into ps_hd_samp (num1,num2) values (1,1)
    into ps_hd_samp (num1,num2) values (2,2)
    into ps_hd_samp (num1,num2) values (3,3)
    select 1 from dual;

    NiranjanSe wrote:
    Hi all,
    i am trying to insert multiple rows using a single insert statement like the below one.
    The below one works fine..
    But is there any other change that can be done in the below one without using dual...
    insert all
    into ps_hd_samp (num1,num2) values (1,1)
    into ps_hd_samp (num1,num2) values (2,2)
    into ps_hd_samp (num1,num2) values (3,3)
    select 1 from dual;
    SQL> create table ps_hd_samp (num1 number,num2 number);
    Table created.
    SQL> insert all
      2  into ps_hd_samp (num1,num2) values (1,1)
      3  into ps_hd_samp (num1,num2) values (2,2)
      4  into ps_hd_samp (num1,num2) values (3,3)
      5  select count(*)
      6  from ps_hd_samp;
    3 rows created.
    SQL> select * from ps_hd_samp;
          NUM1       NUM2
             1          1
             2          2
             3          3

  • Can I use photoshop cc and bridge without using lightroom

    Generally i prefer to ignore lightroom and start from Bridge.  I am currently using CS5.  Said another way, if i purchase PS CC do i have to use lightroom?

    Yes, you can use Photoshop+Bridge without using Lightroom.
    You can subscribe to the Photography Package for $9.99/month, use Photoshop and Bridge and ignore Lightroom.

  • Using toshiba canvio hard drive without using time machine

    Has anyone used the Toshiba Canvio external hard drive to save files to without using time machine?  I want to move files off of my computer onto the external drive not just duplicate all the files on my computer as a backup.

    I guess the external drive is hanging off the Mac..
    Getting access to the drive from PC should be possible.. you may need to move public directory onto the external drive and then set up permissions to do it.. I have not done it and simply would not do it.
    External hdd are cheap enough buy one for the pc.. That is then formatted NTFS which windows is going to natively read.. this will be much easier if the backups are ever required than to use HFS+ formatted disk hanging off the Mac.
    You can also get your dead TC fixed.
    https://sites.google.com/site/lapastenague/a-deconstruction-of-routers-and-modem s/apple-time-capsule-repairers

  • Use JDeveloper with OAF exstension without using EBS

    hey everyone;
    well my question is can i use JDeveloper woth OAF exstensions to develop app without using EBS??

    Why would you want to do that?
    ADF offers much better functionality for your applications if you are not developing for EBS.
    Just pick up the latest JDeveloper version and use it for your independent applications.

  • Pretagging text with ID styles without using XML tags

    I just wanna pretag some text with ID styles, such that when I place the text, it joins the layout already formatted.
    But how? Can I do this without drinking from the XML cup?
    Thx.

    Many thanks for your reply.<br /><br />When I export tagged copy (either verbose or abbreviated methods), the resulting text document is complex -- all kinds of coding. Yet, when placed back into ID, it appears correctly formatted.<br /><br />But my attempts to pretag new text with, say, <ParaStyle:New subsubcat> (one of the exported tags), brings in the tag itself, not correctly formatted new text. What to do?<br /><br />I was unable to locate the PDF document about tagged text that you referenced. My upgrades are downloads, not discs.<br />Any further suggestions on where to find the PDF document.<br /><br />Thanks again.

  • HT5622 Can an iPad mini with sim can text to other network without using email?

    Hello,pls answer my question please..

    Thanks, but I have done that.  All the settings on the mini are identical to the iPad 3 & still the mini won't work properly.  I'm sure it was something I had to change on servers to get both the Macbook & iPad 3 working, just wish I could remember what!!  Any more suggestions welcome! Thanks

Maybe you are looking for

  • To play video stream by using MHP

    Hi I want to play a video from the MHP application. Could anybody help me of that. Thanks, Ranikkarasu

  • Currency default

    The currency default on my Q10 wont change to £ and remains as $ even though i have changed my regional settings to UK, does anyone else have this problem or is my handset just faulty. i know it may sound trivial but it is really annoying having to g

  • Catalog files path in NTFS

    Hello Experts, I am encountered with a scenario where i need to recover Web and Catalog folders from file system since MII intelligence portal is down Also nwa. could you please help me how to find the folders ? i have recovered WEB folders but not a

  • Sharepoint server get all Updates except share point Updates

    hi I have a sharepoint server that sharepoint 2013 has installed on that .my Update server is sccm 2012 r2 and I checked all office 2003,2007,2010,2013 product to be synchronized .every thing is good sccm work fine in synchronizing update with Micros

  • Systems Center and WSUS - Deploying updates

    Hi I'm having a bit of a nightmare trying to get a client to update from Systems Center when using WSUS. I've installed and downloaded on Systems Center the necessary updates etc but the test PC had difficulty downloading the updates.  Upon research