Search Result

Collapse
11 results in 0.0014 seconds.
Keywords
Members
Tags
swing
  •  

  • swing- How do I read *.doc (MS Word) into JTextPane?

    I'm using the apache POI to read MSWord documents. I'm using this example as a template:

    http://javamix.wordpre ss.com/2009/05/14/reading-data-from-the-doc-file-by-using-apache-poi-api/

    The problem is I want the contents to read into a JTextPane. And insertString() is not recognized by HWPFDocument.

    From the 'for' statement that prints to console from the example in the link above, how do change it to print...
    See more | Go to post

  • java872
    started a topic java swing program for JTextField
    in Java

    java swing program for JTextField

    How to change the JTEXTFIELD properties by pass the parameters without using the default functions.For Example if i want to change the JTextField LEFT property means using parameter (control name,left,100) like this.how to i do change JtextField property by passing parameter to the JTextField Property?
    See more | Go to post

  • Scott Evans
    started a topic How Do I Implement Java Swing and JLabel?
    in Java

    How Do I Implement Java Swing and JLabel?

    I have been writing a program that allows the user to select and then post items to a screen. It will also redraw the screen. It sets up fine the first time the classes are called. However, after redrawing the container, I cannot make a call to draw to the container from the object used to set it up. I have tried using JFrames, JPanels; a separate class. Is there a way to do this?

    The object called to create the GUI is below.
    ...
    See more | Go to post
    Last edited by Niheel; May 22 '11, 07:04 AM. Reason: fixed code tag

  • hamstrd
    started a topic Panel Swapping! Help needed!!!
    in Java

    Panel Swapping! Help needed!!!

    Hi all, i am working on an assignment where i have to design an automatic check in system for an airport. I am using the swing library, as well as using actionlisteners .

    My issue is, that i try replacing panels, to move from screen to screen. It worked so far with replacing one panel( Panel A for panel B), but now i've added a new panel (C) i want it to go from panel B to C. However, what happens is that goes from panel A straight...
    See more | Go to post

  • yeshello54
    started a topic java loops
    in Java

    java loops

    Hello. So i have a question regarding incrementing a value in a loop.

    I have a data table in my swing program. the data table has 5 columns. In the last column is a integer. I want to be able to grab all the prices in a table of n size. as of right now i just grab the first column's price by doing the following..

    Code:
    Object colIndex = dataTable.getValueAt(0,4);
    how would i go about constructing a loop that...
    See more | Go to post

  • yeshello54
    started a topic java array help
    in Java

    java array help

    so here is my problem...in a contact manager i am trying to complete i have ran into an error..we have lots of code because we have some from class which we can use...anyways i keep getting an error when i do the following. if you add a contact with up to 13 fields it will be stored in a data structure. i have a tabbed pane that will show six of the 13 fields for that contact. when you double click the contact i want it to pop up and show all 13...
    See more | Go to post

  • yeshello54
    started a topic JButton Hellp
    in Java

    JButton Hellp

    So I want to set the background color of a Jbutton. I know that the normal way to do such a thing is down the following way:

    JButton button = new JButton("xxxx") ;
    button.setBackg round(Color.RED );

    but in my program i add my Jbutton the following way..

    horizontalBox2= Box.createHoriz ontalBox();
    horizontalBox2. add(new JButton("Black" ));

    so how would...
    See more | Go to post

  • yeshello54
    started a topic Java Array HELP
    in Java

    Java Array HELP

    I Have a question regarding arrays and filling a 4x4 grid..here is my function.
    **this is the grid that is created....
    ////////////////////////////////////////////////////////////
    //color grid

    colorPanel= new JPanel();
    colorPanel.setL ayout(new GridLayout(4,8) );
    colorPanel.setP referredSize(ne w Dimension (350,350));

    colorPanel.setM aximumSize(new Dimension(350,3 50));...
    See more | Go to post

  • yeshello54
    started a topic java swing slider help!!
    in Java

    java swing slider help!!

    Hey guys i am pretty new to java swing and need some help. I am developing a simple color chooser program in swing. I have a color panel that is connected to three sliders. red green and blue. but for some reason i cant get it to work..i will post my code and if anyone has any insight to why my changelistener wont work correctly I would really appreciate it. Thanks.

    Code:
    import java.awt.*;
    import java.awt.event.*;
    ...
    See more | Go to post
    Last edited by JosAH; Jul 23 '09, 06:00 AM. Reason: added [code] ... [/code] tags

  • KiddoGuy
    started a topic Adding an icon to a JPanel
    in Java

    Adding an icon to a JPanel

    Hello, I'm trying to add an icon to a JPanel in the event where a button is pressed. I have the following code:
    Code:
    private void button1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            javax.swing.ImageIcon icon = new javax.swing.ImageIcon("/home/bbraun/NetBeansProjects/RPGI/sample2.jpg");
            javax.swing.JLabel label = new javax.swing.JLabel();
            label.setIcon(icon);
    ...
    See more | Go to post

  • r035198x
    started a topic Doing Swing right
    in Java

    Doing Swing right

    I have put together this article to give people starting Swing an awareness of issues that need to be considered when creating a Swing application. Most of the Swing tutorials that I have seen just help people display some nice widgets quickly without explaining some issues that need to be tackled when a full application needs to be developed. This article does not go into full implementation details because those can be found by reading the relevant...
    See more | Go to post
Working...