Unique GUI Components

How do I go about creating my own Unique GUI Components.
For instance I would like to create a volume knob, that turns clockwise and couterclockwise.
Best regards,

Start off with extending JComponent, add methods for turning the knob, and have paintComponent show the turning knob. Add methods to be able to add listeners that you want. That should get you started.

Similar Messages

  • Event handling in custom Non-GUI components

    I have a class which needs to fire events to outside. These events maybe captured by several objects in outside world. How can I achieve this? In so many places I read, they always refer to AWT and Swing whereas my objects don't have any dependency to GUI.
    I simply need to fire an event from an object, and capture that event from other objects by registering event handlers.
    I have experience in .Net programming with Events and Delegates (function pointers), but cannot find something like that in Java. All it offers is various kinds of GUI related Listeners where I can't find a proper help resource using them in Non-GUI components.

    ravinsp wrote:
    I have a class which needs to fire events to outside. These events maybe captured by several objects in outside world. How can I achieve this? In so many places I read, they always refer to AWT and Swing whereas my objects don't have any dependency to GUI.
    I simply need to fire an event from an object, and capture that event from other objects by registering event handlers.
    I have experience in .Net programming with Events and Delegates (function pointers), but cannot find something like that in Java. All it offers is various kinds of GUI related Listeners where I can't find a proper help resource using them in Non-GUI components.If you want to make your own Listener make your Listener. Create an event class that encapsulates the event as you want, create a listener interface that has a method like handleMyEvent(MyEvent me) and then add addMyEventListener, removeMyEventListener methods to your original class. Add a List<MyEvent> to your original class and add the listeners to it and then when events happen
    MyEvent someEvent = new MyEvent();
    for(MyEventListener mel : eventlisteners)
       mel.handleMyEvent(someEvent);

  • SAPgui.exe is running even after closing the GUI components

    Hello All,
    Even after closing the SAP GUI components like Bex, WAD or RSA1 etc... i am able to see these processes are running under the Task Manager--> Processes....
    even if i try to restart the system, error messages are occuring...saying that SAP is still opend...
    Why it is happening, any ideas?
    Thanks,
    Ravi

    Hi Dirk,
    Thanks for your infomation. Infact, apart from this problem, i have the problem with saving the webtemplate. As it is taking much time to save a template after modifications, i had to terminate the wad process. It seems above 2 problems are related....any ideas?
    Thanks
    ravi
    Message was edited by: Ravi Pasumarty

  • Customer gui components needed?

    I require to build a program with which allows the user to add representations of objects onto the main GUI by adding a seperate square for each object. each square should be capable of being moved, resized, deleted as well as have text displayed in it, and another object associated with it (but I'm currently just dealing with the GUI side of things). Each square will also need to be connected to others by means of an arrow from one square to another. Any suggestions as to where to start as there does not seem to be any appropriate widgets provided by java for this and I am having trouble finding stuff on the net about it. Will creating my own custom GUI components be the best option? If so any tips on how to do this?
    Regards

    Hello Ravi,
    Create a Variable for 0CALMONTH, and use this code,
    ' Declare this in the top
    data : v_startmon(6) type n,
    v_endmon(6) type n,
    ' Include this in the case statement
    when 'VarName'.
    ' Step 2 will execute after the user Input
    if i_step = 2.
    v_year = sy-datum(4).
    v_mon = sy-datum+4(2) - 1.
    ' If the month is Jan
    IF v_mon = '00'.
    CONCATENATE v_year '01' INTO v_startmon.
    CONCATENATE v_year '01' INTO v_endmon.
    ELSE.
    CONCATENATE v_year '01' INTO v_startmon.
    CONCATENATE v_year v_mon INTO v_endmon.
    EndIF.
    clear l_s_range.
    l_s_range-low = v_startmon.
    l_s_range-high = v_endmon.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    append l_s_range to e_t_range.
    Endif.
    Please see this for
    [User Exits in SAP BW|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/23f2f094-0501-0010-b29b-c5605dbdaa45]
    [User Exit Examples|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6378ef94-0501-0010-19a5-972687ddc9ef]
    Also see this
    [Dependencies for Variables of Type Customer Exit |http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm]
    Thanks
    Chandran
    Edited by: Chandran Ganesan on Mar 17, 2008 1:57 PM

  • Clearing GUI components displayed in a JFrame window

    Hi Programmers and Developers,
    Good day to y'all!
    My application displays a number of GUI components on the screen. I intend to design a JButton that can clear the window of all these GUI components when it is clicked. Is there a method that can erase already displayed GUI's or is their a technique i can implement to achieve this??
    Many Thanks and Merry Xmas!

    You clear components the in much the same way that you added them
    See Container.remove(Component)
    You will of course want to call validate(); repaint() after removing a component.
    Make a small dummy app to test this out.
    You might also want to look at tjacobs.ui.util.ComponentMapper (which you can find in TUS). It may make finding the components you want to remove easier

  • Flyweight Pattern use with multiple GUI components

    Hi,
    I am creating a simple application and I would like your advice on wether I should use the flyweight pattern or not.
    My application is essentially a GUI front to a repository of small images. The GUI (in its simplest form) is a single window that will display all the images with their names in a clickable thumbnail format. The user will be able to select an thumbnail icon, drag it and move it around pretty much like the icons on your computer desktop.
    The easiest way to do that is probably to load each image and its name into a JLabel, add it in a JFrame and write just few lines of code (say by extending the JLabel class) to handle mouse pressed/dragged events in order to move the label around. The rest will be taken care of by the swing functinality (e.g. painting etc).
    However, I am considering using the flyweight pattern for efficiency but I am not sure if it is appropriate. So far I have seen simplistic examples of its use (apart from JTree) where the pattern is used to paint dozens of lines on the screen or the borders of components. But what happens if instead of lines or borders the objects in question are interactive GUI components such as my thumbnails? how does the flyweight pattern work in this case?
    For example if I create just a single JLabel and use it to paint all my icons that's great! but what happens with mouse events? what happens when I want to drag a thumbnail over another one and how the partial repainting of the thumbnail below should be handled?
    Am I missing something here, or in order to implement the flyiweight pattern in this case I will have to write endless lines of code to replicate the functionality that swing arleady provides in each JComponent? (e.g. targetting of mouse events, repainting etc)
    Cheers,
    Kyri

    I don't think Flyweight applies, because you really don't want to share any UI component that generates events unless the response is the same for all of them.
    If you read Flyweight, I think it was intended for things like caching the first 128 Integers, etc. - think finite, countable, immutable things. I don't think UI elements apply.
    %

  • Save GUI components in a XML format

    I am looking for a technoology that can help to create a my own file format using java. That mean currently im working with implementing a mind mapping tool (like mindjet) which will help to do basic mind mapping actions like add, edit, delete topics.
    But I have faced for a ig problem when im saving a created map. because it should save as a new file format and should be able to re-open for editing.
    What I planned is to retrive the GUI component's(elements of the map) properties from the map and write those values to the XML file(using XML DOM or SAX). Then read those saved values and create the GUI components under retrieved data.
    what I want to know is that. Is my approach is correct? or is there any better solution for this matter?
    please clarify me and I would really appreciate your help?
    Regards
    Lakshitha Ranasinghe

    You presumably have some state, in memory, that you want to persist. From your post, though I must confess that the terms you use are not really clear in terms of what type of data you actually want to say, my guess is that you have some graph of objects in memory that you have parsed that you want to serialize and persist and then later deserialize and restore for reuse in a subsequent execution of your program.
    If yes, then your goal is really simple: how do I save the state of my application and then restore it?
    Go to the filesystem: store as a properties file (key-value pairs), Java's default serialization, XML or a totally custom format
    Go do the database: map your object to a proper database table and column (via JDBC or an O/R mapper ala Hibernate), or store what you would have stored in the filesystem in a databaseXML is a valid option. So is a simple properties file. It depends on your requirements. If you are reading from and writing to a Java application, and frequent versioning is not an issue, then Java's default serialization could be a possibility. Going to the database would be the 'enterprise' solution, but requires testing and the successful functioning and communication between two technologies and machines. It depends on your requirements.
    - Saish

  • [SOLVED] Slow Desktop GUI components

    Arch Linux 64
    i5 -2500k  / 8GB Ram /  Nvidia with the closed source drivers
    OpenBox
    LXPanel
    compton-git (from AUR)
    I am running into a strange recurring problem for some time now.
    Even though running and launching applications is fast, various GUI components of individual apps are lagging.
    For example moving through the preferences tabs of Pidgin, or preferences tabs of firefox, or changing between open tabs in Firefox( does not happen in Chrome) or generally using the GUI dialogs of certain applications might take 2-3 seconds from the time I clicked to the gui component to the time the change occurs (for example changing from one preference tab to another).
    I do not have any performance issues generally in the system, except those gui components that are painfully slow.
    Things i have tried so far:
    -Initially i thought it was only manifesting in firefox so I reseted the profile but that did not improve the situation.
    -I thought it might have to do with GTK so I deleted the .gtk-bookmarks from home dir (in order to be recreated) but that did not improve the situation. I still believe it might have something to do with GTK.
    any suggestions are greatly appreciated.
    Last edited by mastorak (2014-05-19 19:56:16)

    After more experimentation I am now fairly certain that the issue is caused by compton.
    I looked into the bugs reported for compton and apparently there are some issues caused by it when used with the nvidia driver having set the backend option to "glx".
    With the following compton config it seems to be working correctly with no slowness.
    backend = "xr_glx_hybrid"
    vsync = "opengl-swc"
    glx-no-rebind-pixmap = true
    glx-no-stencil = true
    paint-on-overlay = true
    unredir-if-possible = true
    Note that the backend "xr_glx_hybrid" config option is only available(for now) from the "compton-git" package and not "compton" package.
    I do not mark it yet as "Solved" as I want to use it for sometime to be certain.
    edit:for syntax errors
    Last edited by mastorak (2014-05-19 08:38:28)

  • Adding custom GUI components to a panel

    <sorry about the 'Hello All' subject in the previous post>
    I am creating a Backgammon game for my JAVA programming class. I would like to design a board and have certain checker pieces that can be dragged around on the board. In the course I am taking, I still have not been able to understand how a GUI interface has GUI components that is "custom built" like my checker class. My checker class below draws a picture of a checker on a JPanel. I want it to exist inside a JPanel(that has a board painted in it) with 30 checkers that can be moved around. Any feedback would be appreciated including helpful packages, classes, trails, etc.
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.util.Random;
    import javax.swing.JPanel;
    import java.awt.BasicStroke;
    // Checker.java - This will draw the checkers used in the game
    public class Checker extends JPanel
    private Color checker_color; // color of checker
    private int abs_pos;
    private int player; // player 1 or player 2
    Checker(Color check_color, int pos, int plyr)
         checker_color = check_color;
         abs_pos = pos;
         player = plyr;
    public void paintComponent(Graphics g)
         super.paintComponent(g);
         Graphics2D g2d = (Graphics2D) g; // cast g to Graphics2D
         this.setBackground(Color.WHITE);
         // make a circle
         g2d.setColor(checker_color);
         g2d.setStroke(new BasicStroke(1.0f));
         g2d.fillOval(47,47, 35, 35);
         g2d.setColor(Color.BLACK);
         g2d.setStroke(new BasicStroke(2.0f));
         g2d.drawOval(47, 47, 35, 35);
    public int getPlayer(){
         return player;
    public Color getCheckerColor(){
         return checker_color;
    public int getPosition(){
         return abs_pos;
    public void setPosition(int pos){
         abs_pos = pos;
    }

    Um... pretty much the way you are doing it in the code you already posted. What is the problem? Not that there's not problems....
    1) setBackground called in paintComponent doesn't do much. Just set the background outside paint and super.paintComponent() will fill the BG color if the component isn't opaque.
    2) a checker, I would expect, would be opaque, actually.
    3) the oval size you draw would probably be better off being based on the size of the component (getSize()) instead, that way it scales easily.
    But other then that, you are doing it right. You probably need to set the size and location of each checker object explicitly, since most likely it's being used in a container with a null layout.

  • Positioning of GUI components

    a question for the java veterans out there,
    i am a student of programming and i wish to learn how to place/position GUI components in java by hard coding it. Is there any trick/technique that this could be done easily? I don't want to rely on netbeans's GUI maker to make my programs's GUI for the rest of my life.
    any help is appreciated.
    (please don't make it quite complicated. ^_^)

    Hi,
    The link to the tutorial you requested is [Laying out Components within a Container|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html], more specific [Doing Without a Layout Manager (Absolute Positioning)|http://java.sun.com/docs/books/tutorial/uiswing/layout/none.html]. But I would suggest you start to learn using the default layout managers first before you venture out into the wild lands named 'absolute positioning'. The layout mangers supplied by Sun (and made by a big bunch of seasoned Sun Java Programmers) help you when something happens in your screen, like resizing the window. If you use absolute positioning you have to handle such cases yourself.
    Abel

  • Initializing JDialogs or Other GUI Components within SwingWorker

    Hello Every one,
    I have been using SwingWorker class heavily in my application and recently I noticed that If I click on a button twice or thrice the third or 4th it takes more time to perform the action in which SwingWorker is being used. So I started reading more about SwingWorker and after reading number of articles and posts on this forum I believe I am not using SwingWorker correctly. But, I am not still sure ( or may be I am afriad or I am not ready to change my code in so many files and so many locations :(
    So I thought to ask some gurus following questions, in this forum before I proceeed with the code refactoring.
    Question 1:* I am performing GUI operations in doInBackground() is it ok to perform swing operations or create swing components in this method of SwingWorker?
    Example Code :
    jbtnModifyUser Action Event
    private void jbtnModifyUserActionPerformed(java.awt.event.ActionEvent evt) {
    setButtonsState(false);
    final SwingWorker worker = new SwingWorker() {
    protected Object doInBackground() {
    try {
    openUserModifierDialog(SELECTED_PROFILE);
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    return null;
    public void done()
    setButtonsState(true);
    worker.execute();
    }Open Dialog Method wich I call from several other Swing Components Action performed event
    private void openUserModifierDialog(UserProfile profile) throws ServerException {
    UserModifierDialog modifier = new UserModifierDialog(_frame, true, profile);
    modifier.pack();
    modifier.setVisible(true);
    if (modifier.isModified()) {
    resetFields();
    populateUserTable();
    } If I click 3 to 4 times same button the 4th or 5th time the dialog opens after soem delay like 10 seconds. But in first two three click it opens quickly like in 2 to 3 seconds. Is it due to the fact that I am perfoming Swing GUI operations in doInBackgroundMethod()?
    Question 2: Should I use EventQueue.invokeLater() but as far as I have learned from the articles, the actionPerformed events already run on EDT.
    Question 3:_ Each dialog has multiple swing components like combo boxes, tables, tress which it populates after fetching data from the Database in its constructor. It takes like 1 to 2 seconds to bring data and initialize all swing components. Once the Dialog is initialized in the constructor I call my own function to set the existing user details ( As shown below ).
    I need to set all the details before I show the Dialog to the user. To achieve this what is the best practice? Where should I use SwingWorker in current scenario? in Dialog's PostInitialize()? In Dialog's Constructor()? or in the Frame's openModifierDialog()?
    public UserModifierDialog(java.awt.Frame parent, boolean modal, UserProfile userprofile)
    throws ServerException {
    super(parent, modal);
    if (userprofile != null) {
    SELECTED_USER_PROFILE = userprofile;
    }else{
    //throw new Exception("Invalid user record. User profile cannot be null. ");
    initComponents();
    postInitialize(); // my function called to set the user details on the screen
    private void postInitialize() throws ServerException {
    _userManager = new UserManager();
    initializeAllPermissions();
    initializeUserGroups();
    setFields(SELECTED_USER_PROFILE);
    private void initializeUserGroups() throws ServerException {
    _jcbUserGroup.removeAllItems();
    _jcbUserGroup.setModel(new ArrayListModel(_userManager.getAllUserGroups ()));
    _jcbUserGroup.setSelectedIndex(0);
    private void setFields(Userprofile profile) throws ServerException{
    _jlblUserID.setText(profile.getUserid().toString());
    _jtfUserName.setText(profile.getUsername());
    _jtfFirstName.setText(profile.getFirstname());
    _jtfLastName.setText(profile.getLastname());
    _jtfPassword.setText(profile.getPassword());
    _jtfConfirmPassword.setText(profile.getPassword());
    _jtaDescription.setText(profile.getDescription());
    _jcbUserGroup.setSelectedItem(_userManager.getUserGroup(profile.getUserGroupID()));
    } Question 4: I noticed that if I use following code in my openModifierDialog function to execute the worker rather then its own execute method the dialog opens quickly each time.
    Is it good idea to use the following to execute a SwingWorker or I shouldn't as I may fall in some threading issues later on which I am not aware of?
    Thread t = new Thread(worker);
    t.start();Hope to hear some useful comments / answers to my queries.
    Thanks in advance.
    Regards

    Thanks for your prompt reply and answers to my queries.
    Well, I know there are enormous faults in this code. Thats why I am seeking guru's advice to clean the mess. Let me give you breif background of the code. The current code was written by some one else using old version of SwingWorker and I am just trying to clean the mess.
    All the JDialog or Swing Components intialization code was in construct() method of previous SwingWorker. Later on when the SwingWorker became the part of Java SE 6 all application code was refactored and the GUI components initialization was moved to the new function doInBackground().
    The sample code represents the current condition of the code. All I needed was a shortcut to clean the mess or to avoid changes at so many places. But it seems that there is no easy workout for the current situation and I have to change the entire application code. I have gone through the SwingWorker API and tutorial @ [http://java.sun.com/developer/technicalArticles/javase/swingworker] and I am doing following to clean this mess.
    Well the following code is proposed refactoring of the previous code. Hope to hear your comments on it.
    private void jbtnModifyUserActionPerformed(java.awt.event.ActionEvent evt) {
    try{
    openUserModifierDialog(SELECTED_PROFILE);
    } catch (Exception ex) {
    logger.error(ex);
    //show some message here
    } finally {
    private void openUserModifierDialog(UserProfile profile) throws ServerException {
    UserModifierDialog modifier = new UserModifierDialog(_frame, true, profile);
    modifier.pack();
    modifier.setVisible(true);
    if (modifier.isModified()) {
    resetFields();
    //UserModifierDialog Constructor
    public UserModifierDialog(java.awt.Frame parent, boolean modal, UserProfile userprofile)
    throws ServerException {
    super(parent, modal);
    if (userprofile != null) {
    SELECTED_USER_PROFILE = userprofile;
    } else {
    //throw new Exception("Invalid user record. User profile cannot be null. ");
    initComponents();
    postInitialize(); // My function called to set the user details on the screen
    private void postInitialize() {
    _userManager = new UserManager();
    setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
    final SwingWorker worker = new SwingWorker() {
    protected Object doInBackground() {
    try {
    return _userManager.getAllUserGroups(); //returns ArrayList of all user groups from database
    } catch (ServerException ex) {
    //Show Message here
    return null;
    protected void done() {
    try {
    if (get() != null) {
    _jcbUserGroup.setModel(new ArrayListModel((ArrayList) get()));
    _jcbUserGroup.setEditable(false);
    setFields(SELECTED_USER_PROFILE);
    else
    //show some error to user that data is empty
    } catch (InterruptedException ex) {
    //show message here
    } catch (ExecutionException ex) {
    //show message here
    } finally {
    setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
    worker.execute();
    private void setFields(Userprofile profile) throws ServerException {
    _jlblUserID.setText(profile.getUserid().toString());
    _jtfUserName.setText(profile.getUsername());
    _jtfFirstName.setText(profile.getFirstname());
    _jtfLastName.setText(profile.getLastname());
    _jtfPassword.setText(profile.getPassword());
    _jtfConfirmPassword.setText(profile.getPassword());
    _jtaDescription.setText(profile.getDescription());
    _jcbUserGroup.setSelectedItem(_userManager.getUserGroup(profile.getUserGroupID()));
    }In some places where data is way too huge I am going to use process and publish methods of SwingWorker.
    Now I have another question, how I can notify/throw any exceptions occured inside SwingWorker doInBackground method or done method to the function who executed SwingWorker. Currenlty I am catching the excpetions in the done method and showing a dialog box. But I want to throw it to the postInitialize method the method who created and executed the Worker. What is the best practice of handling exceptions in SwingWorker methods.
    Do you see any problems in proposed refactoring?
    Hope to hear your comments.
    Regards

  • XML as datasource in GUI components framework

    Hi all,
    I'm looking for a framework to use XML data as datasouce to GUI components like Swing ones. I've investigated SwingLabs but in it XML databinding namely is under process now. Can anyone suggest something on the subject?
    WBR, Max

    if there are few data use odbc directly to the xml...
    but the best way is to put them in a relational Db
    i hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • GUI components not clearing from JDialog closing

    Greetings,
    I have developed an application which works on several different computers with several different JVMs, but which does not operate as anticipated on my (new) tablet PC. It leaves GUI components on the main JFrame from various Jdialog boxes (after closing them) that I throw at the user when the program starts.
    I also have a username/password prompt at the beginning which is another JFrame that doesn't appear correctly. The input areas do not appear with a white background and the Username and Password JLabels have echoed themselves into that area.
    I'm guessing this is Windows XP, Tablet Edition issue. I'd like to know if anyone else has experienced anything similar?
    FYI, this programs works quite well on Windows 98, Windows XP Home and Professtional, Windows 2000, and Windows ME.
    Any help would be most appreciated.
    Regards

    Hi all,
    I am trying to develop a Java application on the Tablet PC. I am new to this platform and could not find much information about Java related Tablet PC development .So I am posting this question here
    Details
    I have developed a Swing Application in Java (J2SDK 1.4.2) for a Client, which currently runs on Windows XP on the Standard Laptop. The application uses the following
    1) Menus
    2) Panels
    3) Dialogs
    It consists of an entry form, which is saved as an XML file on the user's computer. Also it uses an Access Database.
    The other thing that the application uses is a Signature Capture Device to capture a user's signature
    I would like to move this application to the Tablet PC.
    I have the following questions
    1) What SDK do I use for the Tablet PC? Also what version of Java web start and Run time?
    2) What kind of changes do I need to make in my application?
    3) Can I make use of the "Ink" feature, which is provided with a Tablet PC in Java?
    4) Where can I find user samples if any for Java Tablet PC development?
    BTW I am using Toshiba Prot�g� 3500 for my project.
    Thanks,
    Raja

  • Rescale GUI-Components on resizeing frame?

    Hello,
    how do I have to implement rescaling GUI-components when a frame (JFrame) is resized by a user on runtime?
    Should I have to use the observer-observable-pattern?
    thanx

    If you've got a layout manager then its automatic otherwise add a WindowListener to capture the resize event then resize them yourself.
    Rob.

  • GUI Components & Graphical drawings

    Hi,
    I�m new to Swing (haven�t done much GUI since Motif!) and I�m a little confused about the relationship between GUI components and �drawn� graphics.
    In my application I have two JPanels � an upper and a lower � that display two views of the same data,
    In both of these JPanels I do my graph drawing using g.drawXXX() or g.fillXXX().
    I label the displays using g.drawString()
    However, I want to add some checkboxes to one of the JPanel displays that will trigger actions in the other JPanel. I�m not sure how to get the checkboxes to show up in the right place. It feels like the GUI components work in Layout mode whereas the graphics are in x,y coordinate space.
    I see that JComponent has setLoaction / setBounds methods � but I�ve not had any joy with these so far.
    I can see that I could create my own JComponent subclass that has the GUI and the graphics area and this could use a Layout to line things up.
    Basically � can I draw GUI components at an x,y coordinate on a JPanel?
    If this sounds like bad practice I�d welcome any sources of reference.
    Many thanks.

    Hi,
    My question probably sounds more complicated than it is owing to my inexperience with Swing. I'm sure what I'm after is done thousands of time in other apps.
    Bascially I have two set of graphs -
    One is pure graphical (plotting stock prices etc.).
    The other contains horizontal "bar" format data that lines up below the stock price graph
    (Again see latest posting here : http://www.chriswardsweblog.blogspot.com/)
    What I'm after is to have some controls at the right hand end of each bars. Presently I would imagine these to be a JCheckBox and maybe a JLabel to replace the g.drawString() rendered label in the screenshot.
    The reason I want this is that the upper graph area shows a plotted view of the bar data. I want to be able to check/uncheck the box to see the plotted quote lines turn on/off.
    I am pretty sure that I need to divide that lower JPanel into a "Graphical" panel for the bars and a "Component" panel for the controls. That feels like the correct thing to do - I just wanted someone to confirm I wasn't getting the wrong end of ths stick.
    If this is the case - I think I need to sort out what Layout I should use that will allow me to get the JCheckbox & JLabel to line up with the bars. I have been look at the Box layout which would seem to allow me to do that.
    I have another open question in this forum about how to toggle the visibilty of the upper panel quote lines - maybe that's where I need a Glass Panel?
    Does this clarify things?
    Thanks for all help.

Maybe you are looking for

  • Program Error from running the *,exe file but works fine running with CVI

    When starting CVI created program on Win 2000, I get message "Program Error". I have created a program using NI/CVI version 5.5. I am running windows 2000, I get message  "Program Error" *.exe has generated errors and will be closed by Windows. You w

  • Mass creation of Service orders for a Field Action

    Hi Experts,   Is there a way to mass create service orders for a service action. Basically we have a part that we want to update in the field that is not part of an IBASE record. We would like to replicate an exact service order, one time, for each o

  • Reg: Automatic creation of one PO from more than one PR

    Hi ,        I have an issue from user. Requirement : The PR's which are generated on vendor and delivery date combination will convert automatically into a single PO irrespective of the material when we run the batch job. Ex: To day for example we cr

  • Emails won't open, and Mail crashes

    Hello, I'd be grateful if anyone could help with this problem (I am clueless so any suggestions welcome): When i open Mail all seems fine until i click on a message in the inbox at which point it pauses then crashes and i get the following error mess

  • Very basic questions on JAX-RPC and wscompile

    Hello, well, I have this tool that generates java packages. The thing is that this tool needs now to generate JAX-RPC compliant java packages. To verify its compilance, I am using wscompile 1.1.3 build R1 and Sun AS Edition 8.2. My questions are: - I