Resize JToolBar from all the cornors

I added buttons to JToolbar. When resize form any cornor it should resize. Added tools should also move in row and column wise to set with size. I am also pasting the code below. How to do this?
package com;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
public class Design {
     private void initComponents() {
          toolbar = new JToolBar();
          docToolbar = new JFrame();
          docToolbar.setAlwaysOnTop(true);
     toolbar.setMargin(new Insets(0,0,0,0));
          JButton image = new JButton();
          image.setIcon(new ImageIcon("d:\\icons\\a.png"));
          JButton cut = new JButton();
          cut.setIcon(new ImageIcon("d:\\icons\\b.png"));
          JButton email = new JButton();
          email.setIcon(new ImageIcon("d:\\icons\\c.png"));
          JButton menu = new JButton();
          menu.setIcon(new ImageIcon("d:\\icons\\d.png"));
          toolbar.add(image);
          toolbar.add(cut);
          toolbar.add(email);
          toolbar.add(menu);
          documentToolbar.getContentPane().add(toolbar);
     docToolbar.setUndecorated(true);
     docToolbar.pack();
     docToolbar.setVisible(true);
     docToolbar.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
     public static void main(String args[]){
          Design ds= new Design();
          ds.initComponents();
     private JToolBar toolbar;
     JFrame doctToolbar;
     JToggleButton[] toolBarButtons;
     JButton image;
     JButton cut;
     JButton email;
     JButton menu;
Thanks

The Java™ Tutorials: [How to Use Tool Bars|http://java.sun.com/docs/books/tutorial/uiswing/components/toolbar.html|Why not read the tuts, dummy?]
Particularly note at which position in a what layout a JToolbar is to be added to its parent container.
db

Similar Messages

  • HT201272 You seems not to understand what I mean and what I'm having like problem. I still have my payment recut  from October of this year when I bought 9 songs in the iTunes Store from my iPhone 4S. The problem is from all the 9 songs, 7 are still avail

    You seems not to understand what I mean and what I'm having like problem. I still have my payment receipt  from October of this year when I bought 9 songs in the iTunes Store from my iPhone 4S. The problem is from all the 9 songs I've paid for, only 7 are still available from this list on my iPhone. There is no possibility to download the other 2 without paying for them. I've spoke to the lady from Mississippi on the phone 2 days ago from about 2 hours calling from Belgium but unfortunately she couldn't help me. It's the 3rd time I complain about this. How many time shall I pay for the same songs?? If you can access my music list and my past receipts payment you will be able to find out what I mean. I went back on iTunes I've found the the songs I already downloaded in October that should be on my playlist but if I click on them it will charge me again 0,99 cents. It's been 3 years I've been using the same apple ID with my iPhones. I just wand to get my songs back without having to pay them twice or 3 times

    1. iTunes won't offer cloud downloads for songs that it "thinks" are in your library, even if it "knows" the files are missing. If you've exhaustively searched for the missing files and there is no prospect of repair by restoring to them to their original locations, or connecting to new ones, then delete that tracks that display both the missing exclamation mark and are of media kind Purchased/Protected AAC audio file. Don't hide from iTunes in the cloud when asked, close iTunes, then reopen. You can download from the cloud links or iTunes Store > Quicklinks > Purchased > Music > Not on this computer > All songs > Download all.
    2. Why? Not sure, perhaps 3rd party tools or accidental key presses combined with previously hidden warning messages when trying to organize the library. There is a hint that using the feature to downsample media as it is synced to a device may also be involved, though I've not replicated it. Whatever the reason a backup would protect your media.
    tt2

  • How can we disable the 'Improvement Program' from all the apps in TCS5?

    How can we disable the 'Improvement Program' from all the apps in TCS5, so that the end users are not able to see the option in the help menu?
    We have tried changing the value of bUsageMeasurement (HKLM\SOFTWARE\Policies\Adobe\(product name)\(version)\FeatureLockdown) to zero, but it did not help.

    You’re probably going to have to contact Support on that one.

  • How to make an app deleted from iTunes library be deleted from all the iOS devices synced with this library?

    Hello!
    I have 3 iOS devices synced with iTunes apps library (OS X 10.10.2)
    Can someone tell me how to make not only added but deleted apps be synced also? I mean I want an app deleted in iTunes library be deleted from any iOS devices synced with this library.

    But it was working some time before! What and when has changed?
    There was even a warning popup window something about "this application will be deleted from all the devices synced with this library"
    Now there's opposite message - "This application will not be deleted from any device syncing with this account". Isn't it some kind of clue that there can be conrarily circumstances - when application IS deleted from ANY device synced with this computer?

  • Selecting string from all the tables in databse

    Hi All,
    I need a help in finding the data from all the database tables at one time using single query.
    For e.g. I wanna search a string 'ABC' in all the database tables for a schema.
    I want to find out,which all tables (in either of its columns) contain this string strored inside themselves.
    For brand name changing,I need to find out all the tables and in turn all the columns containing that string where databse consisting of 1000 tables.
    Could anyone suggest me some option for this?Is it possible to avoid this tedious task to search individual table?

    Why is it necessary to search every column? Does your data model permit the brand name to be stored in any column?
    Whatever.
    I suggest starting with dba_tab_columns (where owner = 'WHATEVER') and look for those tables/columns that could possibly hold the brand name. You can eliminate NUMBER and DATE columns and VARCHAR columns that are too short.
    Spool that out to another script where each select statement is like this:
    SELECT 'TABLE_NAME.COLUMN_NAME', column_name
    FROM table_name
    WHERE UPPER(COLUMN_NAME) LIKE '%BRAND NAME%'
    AND rownum = 1;

  • HELP I have lost all my motion 4 content from all the files, ive looked in all the files and they are all empty. can i get replacement content as I my dvds where stolen along. with my other laptop.

    HELP I have lost all my motion 4 content from all the files, ive looked in all the files and they are all empty. can i get replacement content as I my dvds where stolen along. with my other laptop. any Ideas. would be a great help. For Motion 4.

    Try a hard reset:- hold the home button AND the power switch - ignore the red "Slide to power off" and wait ubntil the iPhone powers down, and then restarts - at the Apple logo, release all the buttons and see if your contacts reappear.

  • Acquiring data from all the analog channels of NI-3202 NODE using a single sensor

    Hi all,
    I would like to know that can i be able to get the data from all the four analog channels of NI-WSN node 3202(analog input node) connecting only single sensor on the analog input and connecting all the remaining analog inputs using wires and also shorting the ground pins corresponding to each analog input pin.
    By configuring the each channels like 0.5 sec delay for every analog channels to acquire data. can we get the sensor data from all the channels by doing this. basically here i am trying to increase the minimum sampling rate of the ni-wsn NODE 3202 which is 1s.
    I this approach is correct or we cannot do this.
    Thanks

    Stefan,
    In terms of differential and RSE, channels 0-8 should default to differential when using test panels.  Differential needs two input channels to function correctly and these channels must be spread apart by 8 channels. (i.e channels 0 and 7 are a differential pair)  Channel 13, on the other hand, will default to rse if chosen as the reading channel because there does not exist another channel that is eight away.  I am not quiet sure if the virtual channels will default channel 5 into being differential but I will check into it.  If it is differential as default then you may run into problems since channel 13 is utilized in both strain gauge reads.   
    "The second question is, if we can also use the "voltage" setting for measuring strain gauges? we did that in the past, using LabView 6.2."
    If you are referring to "voltage" as acquiring a signal with custom voltage with exciation then I would reccomend using example in LabVIEW called Acq Wheatstone Bridge Samples (with Calibration).  This can be found by navigating to LabVIEW's example finder and expanding Hardware Input and Output>>DAQmx>>Analog Measurements>>Strain.
    I have also included some useful links that may provide more insight into the SCC modules as well.  Also, what is the excitation voltage and power that your strain gauges are expecting?
    SCC Tutorial Series: SCC-SG0x
    SCC Example Series: SCC-SG0x
    Using the SCC-SG11 Shunt Calibration Module
    Thanks,
    Gio L.
    Digital Support - Product Manager
    National Instruments

  • I am a SAP Netweaver Consultant , want to know from all the SAP Experts out here that according to you which are the highest paying modules in SAP ? rank them.

    I am a SAP Netweaver Consultant , want to know from all the SAP Experts out here that according to you which are the highest paying modules in SAP ? rank them.

    Hi S. Vishwam.
    Many peoples says that BI , APO , BW and HANA are the highest paying modules.
    But with the passage of time the value of the professional decreases because many people go work with this modules then ...supply and demand = decreases.
    Only the people that really knows continue making lots of moneyand the characteristic of these people are the same:
    They always read the SDN community of his modules.
    They really study the sap help.
    They do not want to make lots of money early on.
    Hope helped you.

  • I can't view old iphoto libraries. It wants me to use a new version of iphoto but from all the commits here, no one likes it. Help! how do i get to my old libraries???

    I can't view old iphoto libraries. It wants me to use a new version of iphoto but from all the commits here, no one likes it. Help! how do i get to my old libraries???

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    what do you see when iPhoto opens?
    what fixes have you tried?
    where is you library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?
    OT

  • Select data from all the table names in the view

    Hi,
    "I have some tables with names T_SRI_MMYYYY in my database.
    I created a view ,Say "Summary_View" for all the table names
    with "T_SRI_%".
    Now i want to select data from all the tables in the view
    Summary_View.
    How can i do that ? Please throw some light on the same?
    Thanks and Regards
    Srinivas Chebolu

    Srinivas,
    There are a couple of things that I am unsure of here.
    Firstly, does your view definition say something like ...
    Select ...
    From "T_SRI_%"
    If so, it is not valid. Oracle won't allow this.
    The second thing is that your naming convention for the
    tables suggests to me that each table is the same except
    that they store data for different time periods. This would be
    a very bad design methodology. You should have a single
    table with an extra column to state what period is referred to,
    although you can partition it into segments for each period if
    appropriate.
    Apologies if i am misinterpreting your question, but perhaps
    you could post your view definition and table definitions
    here.

  • How to fetch data from all the libraries/lists from a website only present in a site collection.

    Hi,
    I have a sitecollection named sitecollectionA....
    There are 3  subsites under this site collection named as site A, site B, site C
    and there are many libraries present in these subsites.
    I want to fetch the items from all the libraries present in site B ONLY.
    My custom webpart is in site B.But I am not able to fetch the data from this particular site(site B).
    I am using SPSiteDatauery....but getting nothing with below scopes-
    query.Webs = "<Webs  Scope=\"Recursive\" />";   ---- this gives data from all subsites and their subsites
    query.Webs = "<Webs  Scope=\"\" />";  -               ----this gives data from only the top level subsite of sitecollectionA
    Below are few lines from my code.....
     SPSiteDataQuery query = new SPSiteDataQuery();
                            query.Lists = "<Lists ServerTemplate=\"101\" />";
                            query.Webs = "<Webs  Scope=\"\" />";
    Please help...

    Got the answer....
    I defined my site collection object like below and it worked.
     SPSite site = new SPSite(SPContext.Current.Web.Url);

  • Disabling "User settings" option from all the WDA applications.

    Hello Experts,
    We have implemented SRM business package.We want to disable right click "User settings" option from all the applications presented in SRM BP.
    I know a way of disabling "User settings" by passing WDDISABLEUSERPERSONALIZATION  parameter. We dont want to follow this approach as there are many applications and it would be difficult to change all the applications.
    My question is do we have any settings ( may be in sicf ) which could disable "User settings" centrally for all WDA application on that particular server?
    Thanks
    Surender singh Dahiya

    Hi surender,
    Check this..
    http://help.sap.com/saphelp_nw70/helpdata/en/7b/fb57412df8091de10000000a155106/content.htm
    Cheers,
    Kris.

  • Exporting Recipients details from all the Notification Subscriptions in SCSM 2012 Sp1

    Hi Team,
    Do we have any powershell script to export the recipients details from all the notification subscriptions from SCSM 2012 SP1. I have tried usind ChildEnumeration, but it didn't return any data. Sooner response would be highly appreciated.
    Thanks,
    Dinesh
    Thanks &amp; Regards, Dinesh

    Subaru, your solution is not sending the email from different domains though.  And it is initiated manually through the console.
    We are looking for the ability to have subscriptions send emails from different domains or email addresses depending on queues or similar.  In my research, I think the only viable option is to use orchestrator as mentioned above and have it monitor
    tickets for criteria specified.  Its a pain and a huge limitation in my opinion.
    I think the bottom line is to not use subscriptions for a full loop email system.  only use it for emails that will not be replied to.

  • From all the problems in the community, I think I will stay with Lion OS, LOL.

    From all the problems in the community with Mountain Lion, I think I'll stay with Lion. The upgrade just doen't seem worth the hassle!

    This is the Emergency Room of Apple-land.  If aliens landed on Earth to invade and first visited an ER in a hospital, they would leave and expect humanity to be extinct with a week.
    Many many many people have not reported success with ML because they are busy using it.

  • Logging out of skype from all the devices.

    Hello,
    I just want to know, how do we logg out from skype from all the devices. Recently, my PC failed to work, I gave my PC to a computer engineer. On that PC, I used to loged in on my skype. I've also got my skype logged in on my mobile. So, would be great if I known how do I logg off from my skype from my computer through my mobile?

    You can try the /showplaces and /remotelogout chat commands.
    http://community.skype.com/t5/Windows-desktop-client/Skype-shows-me-online-though-I-am-not-connected...

Maybe you are looking for

  • Force Textfield Validation??

    Hello, I am using the Spry Text Field Validation widget to validate my username field in a registration form. On blur, it checks to see if the username exists. Is there a function I can call from that checking function to classify that field as inval

  • Why, When i download something on my MBA 2013 it doesn't work?

    A few days ago i purchased a MBA mid 2013. When i downloaded Adobe Flash Player it didnt work the first time. When I went into the downloads section the downloaded part was faded and i could not open it. I deleted it and downloaded it again and that

  • Number range in Lead Transaction

    Hi , In my Sandbox we have created one lead transaction and assigned one number range to that transaction.Now suddenly we figured out that one number of that range is assigned to more than one transactions of the same T type. eg 116 number is assigne

  • Can you tell me how many photo's, apps and songs can a 128gb new mac air hold. thanks

    Hi, can you please tell me how many songs, apps, photos a new 128gb mac air hold? thanks

  • "Search in Google" not functioning

    Hi there, Just noticed that when I highlight something in a Mail message, right-click and select "Search in Google", nothing happens. I think it was OK a week ago, I use that feature fairly often. I cannot find anything on it in this forum, so I'm gu