How to get a specific layout with the available layout managers?
Hi
Not done java GUI's (approximately 5 and a half years) for a while (I havn't even touched java for ages until a few months ago), and I am a little embarrased by how much I have forgotten.
After tring unsuccessfully several times with TableLayouts and GridBagLayouts to produce this [ [http://i32.tinypic.com/fl94kp.png] ] sort of layout, I have decided I am either being incredibly stupid, or It's a rather difficult thing to do.
(Sorry about the crudeness of the drawing)
Please can someone point me on the right track as to what combination of layout managers + components I should be using to achive this, or even be super kind and post a code snippet for it.
Preferably, I would like to use just the default layout manages / components that come with java, which will allow me to continue working on the GUI in netbeans without it complaining, but I'll use external libraries if absolutely nesecarry.
Thanks
A completely unrelated side note, but where the heck have all my past posts and dukes gone. :(
Edited by: DarthCrap on Aug 2, 2010 5:14 PM
Yes, A BorderLayout did solve my problems. It appears I was being stupid after all. :)
@Encephalopathic. Using a gridbaglayout does indeed help with the centering issue for the smaller panel on the right. I had just worked that out myself when you posted. I had been reluctant to try the gridbaglayout for that, because it caused me a load of pain when I tried using it for the original problem.
Thanks
Similar Messages
-
How to assign project specific task with the newly created projects ?
Hi All,
I need help. I need to assign project specific tasks (which i will be taking from staging table) other than the default task which are assigned during project creation. How do I proceed with this within same package. I am attaching the code of my package below...
CREATE OR REPLACE PACKAGE body xxpa_proj_conv_pkg as
PROCEDURE xxpa_create_project_proc(O_ERRBUF OUT VARCHAR2,O_RETCODE OUT VARCHAR2)
is
variables need to derive global parameters
v_responsibility_id NUMBER; --- PA Supervisor responsibility id
v_user_id NUMBER;
deriving global parameters-
-- Variables needed for API standard parameters
v_api_version_number NUMBER := 1.0;
v_commit VARCHAR2(1) := 'F';
v_return_status VARCHAR2(1);
v_init_msg_list VARCHAR2(1) := 'F';
v_msg_count NUMBER;
v_msg_index_out NUMBER;
v_msg_data VARCHAR2(2000);
v_data VARCHAR2(2000);
v_workflow_started VARCHAR2(1) := 'Y';
v_pm_product_code VARCHAR2(10);
---variables for catching errors---
v_error_flag number:=0;
-- Predefined Composite data types
v_project_in PA_PROJECT_PUB.PROJECT_IN_REC_TYPE;
v_project_out PA_PROJECT_PUB.PROJECT_OUT_REC_TYPE;
v_key_members PA_PROJECT_PUB.PROJECT_ROLE_TBL_TYPE;
v_class_categories PA_PROJECT_PUB.CLASS_CATEGORY_TBL_TYPE;
v_tasks_in_rec PA_PROJECT_PUB.TASK_IN_REC_TYPE;
v_tasks_in PA_PROJECT_PUB.TASK_IN_TBL_TYPE;
v_tasks_out_rec PA_PROJECT_PUB.TASK_OUT_REC_TYPE;
v_tasks_out PA_PROJECT_PUB.TASK_OUT_TBL_TYPE;
v_CREATED_FROM_PROJECT_ID varchar2(20);
v_CARRYING_OUT_ORGANIZATION_ID varchar2(20);
v_person_id NUMBER;
v_project_role_type VARCHAR2(20);
API_ERROR EXCEPTION;
v_a NUMBER;
cursor for project in data
CURSOR cur_project_in_data IS SELECT * FROM XXPA_PROJECT_IN_STG;
cursor for task data
CURSOR cur_task_in_data IS SELECT * FROM XXPA_TASK_IN_STG;
------------------------Cursors used for validations----------------------------------
cursor for product code used for validation
cursor cprc is select distinct PROJECT_RELATIONSHIP_CODE from PA_PROJECT_CUSTOMERS;
cursor for distribution rule-
cursor cdr is select DISTRIBUTION_RULE from PA_DISTRIBUTION_RULES;
cursor for project status code
cursor cpsc is SELECT PROJECT_STATUS_CODE, PROJECT_STATUS_NAME FROM PA_PROJECT_STATUSES WHERE STATUS_TYPE = 'PROJECT';
cursor for template/created from project id
cursor ccpid is select project_id from pa_projects where template_flag='Y';
BEGIN
select user_id, responsibility_id into v_user_id, v_responsibility_id
from PA_USER_RESP_V
where user_name like 'amit_kumar%'
and responsibility_name like'PA SupervisorS';
-- --Fnd_global.apps_initialize(user_id,resp_id, resp_appl_id);
-- Fnd_global.apps_initialize(v_user_id,v_responsibility_id,275);
-- -------calling global parameters---
pa_interface_utils_pub.set_global_info
p_api_version_number =>v_api_version_number,
p_responsibility_id =>v_responsibility_id,
p_user_id =>v_user_id,
p_msg_count =>v_msg_count,
p_msg_data =>v_msg_data,
p_return_status =>v_return_status
dbms_output.put_line ('Set Global status ->' || v_return_status);
----Cursor for PRODUCT RELATED DATA-----------
FOR REC IN cur_project_in_data LOOP
-----PASSING VALUES TO THE COMPOSITE DATA TYPE(PROJECT_IN_REC_TYPE)-------
----retrieving product code-----
select lookup_code into v_pm_product_code
from pa_lookups
where lookup_type = 'PM_PRODUCT_CODE'
and meaning = 'Oracle Project Manufacturing';
-----retrieving and validating created from project id----
BEGIN
select project_id
into v_CREATED_FROM_PROJECT_ID
from pa_projects_all
where name=rec.created_from_project_name;
EXCEPTION
when others then
O_Retcode := '1';
O_Errbuf :='Incorrent CREATED_FROM_PROJECT_NAME';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where created_from_project_name = rec.CREATED_FROM_PROJECT_NAME;
END;
-----retrieving & validating carrying out organization id-----
BEGIN
select distinct(CARRYING_OUT_ORGANIZATION_ID)
into v_CARRYING_OUT_ORGANIZATION_ID
from pa_projects_prm_v
where CARRYING_OUT_ORGANIZATION_NAME=rec.carrying_out_organization_name;
EXCEPTION
when others then
O_Retcode := '1';
O_Errbuf :='Incorrent Carrying Out Organization name';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where carrying_out_organization_name = rec.carrying_out_organization_name;
END ;
v_project_in.pm_project_reference := rec.segment1;
v_project_in.project_name := rec.PROJECT_NAME;
v_project_in.created_from_project_id := v_CREATED_FROM_PROJECT_ID;
v_project_in.carrying_out_organization_id := v_CARRYING_OUT_ORGANIZATION_ID;
v_project_in.project_status_code := rec.PROJECT_STATUS_CODE;
v_project_in.description := rec.PROJECT_DESCRIPTION;
v_project_in.start_date := rec.PROJECT_START_DATE;
v_project_in.completion_date := rec.PROJECT_COMPLETION_DATE;
v_project_in.distribution_rule := rec.DISTRIBUTION_RULE;
v_project_in.project_relationship_code := rec.PROJECT_RELATIONSHIP_CODE;
-------------------------Validation of incoming project data--------------------------------
v_error_flag := 1;
project relationship code validation
BEGIN
for prc in cprc
loop
if (rec.PROJECT_RELATIONSHIP_CODE=prc.PROJECT_RELATIONSHIP_CODE) or (rec.PROJECT_RELATIONSHIP_CODE is null)--can be overridden from template
then
v_error_flag :=0;
else null;
end if;
end loop;
END;
project distribution rule validation
BEGIN
for dr in cdr
loop
if (rec.DISTRIBUTION_RULE=dr.DISTRIBUTION_RULE) or (rec.DISTRIBUTION_RULE is null) null since the value can be taken from template too
then
v_error_flag :=0;
else null;
end if;
end loop;
END;
project status code validation
BEGIN
for sc in cpsc
loop
if (rec.PROJECT_STATUS_CODE=sc.PROJECT_STATUS_CODE) or (rec.PROJECT_STATUS_CODE is null) null since the value can be taken from template too
then
v_error_flag :=0;
else null;
end if;
end loop;
END;
dbms_output.put_line ('Error at PROJECT_STATUS_CODE>' ||v_error_flag);
validation logic for project start date
BEGIN
if TRUNC(rec.PROJECT_START_DATE) >= TRUNC(rec.PROJECT_COMPLETION_DATE)
THEN
v_error_flag := 1;
O_Retcode := '1';
O_Errbuf :='Project start date cannnot be greater than completion date';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
END IF;
END;
validation logic for project completion date
BEGIN
if (TRUNC(rec.PROJECT_COMPLETION_DATE)<=TRUNC(rec.PROJECT_START_DATE))
then
if ( rec.PROJECT_STATUS_CODE='CLOSED' and rec.PROJECT_COMPLETION_DATE>sysdate)
THEN
v_error_flag := 1;
O_Retcode := '1';
O_Errbuf :='completion date cannot be greater than sysdate for closed projects';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
END IF;
v_error_flag := 1;
O_Retcode := '1';
O_Errbuf :='Project closed date cannot be less than start date';
end if;
END;
--------Update staging table for the error records--------
BEGIN
if v_error_flag =1
then
O_Retcode := '1';
O_Errbuf :='Incorrect project relationship code';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where PROJECT_RELATIONSHIP_CODE = rec.PROJECT_RELATIONSHIP_CODE;
end if;
END;
-----------------------End of validation of incoming project data----------------------------------
---------------Project Task DATA-----------------
v_a:=0;
FOR tsk IN cur_task_in_data LOOP
v_tasks_in_rec.pm_task_reference :=tsk.task_reference ;
v_tasks_in_rec.task_name :=tsk.task_name;
v_tasks_in_rec.pm_parent_task_reference :=tsk.parent_task_reference ;
v_tasks_in_rec.task_start_date :=tsk.task_start_date ;
v_tasks_in_rec.task_completion_date :=tsk.task_completion_date ;
v_tasks_in(v_a) := v_tasks_in_rec;
v_a:=v_a+1;
end loop;
---------------end of task details------------------
--INIT_CREATE_PROJECT
pa_project_pub.init_project;
---------------------CREATE_PROJECT--------------------------
pa_project_pub.create_project(
p_api_version_number=> v_api_version_number,
p_commit => v_commit,
p_init_msg_list => v_init_msg_list,
p_msg_count => v_msg_count,
p_msg_data => v_msg_data,
p_return_status => v_return_status,
p_workflow_started => v_workflow_started,
p_pm_product_code => v_pm_product_code,
p_project_in => v_project_in,
p_project_out => v_project_out,
p_key_members => v_key_members,
p_class_categories => v_class_categories,
p_tasks_in => v_tasks_in,
p_tasks_out => v_tasks_out);
if v_return_status = 'S'
then
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET INTERFACE_STATUS ='Success' where segment1 = v_project_out.pa_project_number; ---P->pending & S-> Success
dbms_output.put_line('New Project Id: ' || v_project_out.pa_project_id);
dbms_output.put_line('New Project Number: ' || v_project_out.pa_project_number);
else
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET INTERFACE_STATUS ='Pending' where segment1 = v_project_out.pa_project_number;
raise API_ERROR;
end if;
END LOOP;
Commit;
------Handling Exception--------
EXCEPTION
WHEN api_error THEN
dbms_output.put_line('An error occured during project creation');
IF (v_msg_count > 0 ) THEN
FOR i IN 1..v_msg_count LOOP
apps.PA_INTERFACE_UTILS_PUB.get_messages(
p_msg_count => v_msg_count,
p_encoded => 'F',
p_msg_index => i,
p_msg_data => v_msg_data,
p_data => v_data,
p_msg_index_out => v_msg_index_out);
dbms_output.put_line('Error message v_data ->'||v_data);
dbms_output.put_line('Error message v_msg_data ->'||v_msg_data);
dbms_output.put_line('Error message v_msg_index_out ->'||v_msg_index_out);
dbms_output.put_line('Error message p_msg_index ->'||i);
APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
END LOOP;
END IF;
WHEN OTHERS THEN
dbms_output.put_line('An error occured during conversion, SQLCODE ->'|| SQLERRM);
IF (v_msg_count >=1 ) THEN
FOR i IN 1..v_msg_count LOOP
PA_INTERFACE_UTILS_PUB.get_messages(
p_msg_count => v_msg_count,
p_msg_index => i,
p_encoded => 'F',
p_msg_data => v_msg_data,
p_data => v_data,
p_msg_index_out => v_msg_index_out);
dbms_output.put_line('Error message ->'||v_data);
APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
END LOOP;
END IF;
end; --end procedure
END xxpa_proj_conv_pkg;
* Please tell me how to assign project specific task with the newly created projects??? *
Also please tell me how to assign multiple * Project_Relationship_Code * (ex: END CLIENT, GENERAL CONTRACTOR, PRIMARY) for a particular project during project creation?Are you not storing the project number in the staging table designed for storing the task data? You can use create_project API to create the project and tasks at the same time with one single call. You may want to try that option
-
How to get a minus sign with the cost field in ALV.
Hi ,
How to get a minus sign with the cost field in ALV.
The Ouput will be displayed like Rs -1500 instead of 1500-
I can't use concatenate also as i may have to use the sum functionality of ALV .
Cheers
SunnyHi sunny,
1. The OTHER FIELD
has to be character field of say length 15.
2. Write the original numeric value to
this character field (in a loop)
3. But simply writing won't help.
4. use this kind of logic.
5.
REPORT abc.
DATA : m TYPE i.
DATA : chr(15) TYPE c.
m = -100.
WRITE m TO chr.
IF m < 0.
SHIFT chr RIGHT BY 1 PLACES.
CONDENSE chr.
CONCATENATE '-' chr INTO chr.
ENDIF.
WRITE chr.
regards,
amit m. -
How to get my photos printed with the full image?!
I just bought iLife and when I select certain cropped photos to print, the top of someone's head gets cut off in the the photo. If I change sizes of prints or rotate the photo, it cuts off different amount of head but never gives the full image. I did not have this problem with iphoto before I installed this new version. I need to have access to printing photos. I use Canon MP500, ibook G4 and Airport Express for wireless printing. I think the prob is iLife cuz it didn't do this before in iPhoto and I have no prob with other applications. Help!!!!!!
Select the photo you want to print, and click on Edit. Then click on Crop, and a drop-down menu will appear. Use this menu to select the photo size that you want to print. Then use the cropping frame to get the photo the way you want. It is important to select the correct size of the printed photo because the ratios of length to width are not the same from one size to another. For example, a 4 x 3 is closer in shape to a square than is a 5 x 7. You might have to try different photo sizes from the drop-down menu to get he result you want.
-
How to get users to start with the first episode?
I checked my stats today and found that the most recent episode of my podcast is the one the has been hit waaay more than any of the others. But I'd really prefer listeners hit the first episode first. Do other podcasters find this? Is it worth re-ordering the dates in the feed to get the fist episode to come up first in the list?
G4 Mac OS X (10.4.3)Actually, you can change the order of items in the RSS feed without changing any of the dates or other info that is within a given item.
Select the episode you want first, cut it and then paste it at the top of the list right after the general feed info. Re-order all your episodes this way (oldest at the top, newest at the bottom). This way, if someone double-clicks the name of your feed episode 1 will be the one they get.
Also, in many podcast lists your episodes are listed in the same order in which you have placed them in your RSS feed
So you just re-arrange the items, but don't change the info in the items.
G5 dual 2.7 Mac OS X (10.4.2)
G5 dual 2.7 Mac OS X (10.4.2) -
HT1386 How do you sync specific songs with the NEW iTunes?
I have a large music library and my iPhone is only 16GB. This limits the amount of songs i can put on it. In the previous iTunes it was possible to remove a song by simply un-ticking it. I've tried that in the current version of iTunes but when i sync, the songs still end up on my iPhone.
What can I do to stop certain songs from syncing (whitout having to create a million playlists)?Make sure that the "Sync Music" option from the Music tab in your iTunes is checked but not the "Entire music library" underneath the "Entire music library" option you can select which parts of you iTunes library to sync with your iPhone.
-
the background behind my pages has turned black, how do i get it to go back to grey? i have switched between preview, normal, bleed, slug and presentation and closed and opened in design and it is still black. I can't imagine layouts with the black background please help!
or maybe the interface has been set to Dark?
Go to Preferences > Interface tab, choose Light from Color Theme dropdown on Apearance section (upper part of the window) -
HT1918 How do you solve an issue with the card? I don't get the option of 'none' :(
How do you solve an issue with the card? I don't get the option of 'none'
I had this exact same problem with the new iPhone I bought on 1/4/13. The walk through they provide on how to do this is useless because it fails to explain that if you are already having the problem of not getting the "None" payment option with an Apple ID then you will need to create a completely new Apple ID.
I had to do this 7 times since I bought my iPhone on Friday until this morning to figure out how to finally be able to use the Home Sharing option in iTunes to put my music collection on my brand new $500.00 iPhone. Pretty pathetic if you ask me but since it made me so angry I want to make sure other know how to do this so you don't get as upset as I did.
#1 If your current or soon to be "old" Apple ID is not providing the option for "None" as a payment option then you need to make a brand new one. But you have to make it specifically how I tell you.
#2 You will need to use an email address that has not already been used for anything related to a previous Apple ID. You might need to make a brand new email address.
#3 Open iTunes, then open iTunes Store (upper right corner of iTunes).
#4 Click on App Store (upper center of screen).
#5 Scroll down the screen page until you see Top Free Apps on the right side.
#6 Choose any one of the FREE apps.
#7 You should either get the option to create a new Apple ID box, either that, or it will pop up with some kind of disclaimer and then it does the create new Apple ID.
Either way just create a new Apple ID when it gives you the option to and then when you get to the page that looks like the payment page the "None" payment option will finally be available.
Note: You will still have to fill out the information on the payment page. As long as you choose the "None" option it will not request any credit card information.
#8 You will be sent a confirmation email to the new email account. Just follow through with what ever it tells you and viola now you can use your Apple Device.
What a pain in the keester, eh? -
My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?
You might consider itunes match for moving CDs you've copied into your itunes library if you dont have a way to use home sharing.
iTunes match is an optional service offered by apple that costs about $25 a year. It scans your music library and if it finds music that is already in apple's itunes catalog it'll automatically "unlock"/"store" these in the cloud for you. Items that it does not find in the catalog it'll upload and store these in the cloud for you and you can download them on your devices. See http://www.apple.com/itunes/itunes-match/ -
Help
I need any help i can get, im having trouble with the app find my iphone. I have lost my iphone, checked on the computer, and somehow, took it away so how do i get it back??If you are saying that after signing into iCloud it is telling you device is not found, it could be for any number of reasons. If the battery is dead, if the SIM has been removed, or if someone else has the phone and they have restored it, it will not be shown. Also, if you located it once and then sent a remote wipe, it disables the abililty to locate the phone with Find My iPhone.
-
Question
when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, PeterSee this. <br />
https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit -
Question
When I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, PeterSee this. <br />
https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit -
I had to wipe out my laptop, I am waiting to get my serial number back. I need to know how I download Logic Pro 9 with the codes I already have.
If you bought the boxed set of Logic Studio 2.0 which includes LP9, then you cannot download it. You must use the disks that came as part of the boxed set... to install from.
If you bought the App Store version of Logic Pro 9 then go to the Mac App Store App, Sign into the Store using the same Apple ID you used to purchase LP originally, look under the Purchase Tab and you shouldl find LP9 ready and waiting for you to download and install. -
I'm trying to learn how to use Xcode. I've create a simple Hide App app from a youtube video tut, but I can't get it to export with the icon I've chosen. Any clues why?
We didn't do that video. Why are you asking here?
Those videos are usually outdated....
Use the current tools etc., in the iOS Dev Center and iTunes/iTunes U ~ Stanford. -
How can I assign a ringtone to a specific contact with the iphone4 ios7
How can I assign a ringtone to a specific contact with the iphone4 ios7?
From the home screen, tap on Contacts, tap on the contact you'd like to edit.
In the top right, tap the , scroll down, for Ringtone, tap on Default, select the desired ringtone.
Maybe you are looking for
-
Output parameters or how to return more than one value
My RMI server retrieves a list of Strings from the database. I need to return a status code int and an array of Strings to the RMI client. Does anybody have any ideas on how to do this. The only way I have come up with is to return an array of String
-
Hello Guys, i want to export many Baselines from one User in my repository to other. Is there a possibility to export Baselines from the commandline? Or can i export all Baselines at once??? I Use OEM 9.2.0 with ORA DB 9.2.0.7 Thanks for response
-
How can I increase the speed in which Finder refreshes network shares on AD network shares
We have 20 Mac's running OS X 10.7.4 all fully patched. We are running a RAID Array off of an HP Proliant 370 G6 with 48 GB RAM. This server is also acting as our Domain Controller running Windows Server 2008 R2. We disabled the Mulitcast broadcast a
-
Indent text MessageTransformBean
hi my scenarion is JMS -> XI -> MAIL I used content conversion to transform the XML to flat file does any body know if I can change the indiation text from left-right to right to left with one of the paramters in the content conversion? thx,shai
-
I like Apple very much but I think is big fail if "Duplicate tab button" is missing in Safari. It is no good way use CMD + L and after CMD + Enter, because history will be lost. Second way through "Preferences->Gneral->New_tabs_open_with", which chan