How to set height of JTable Header ?
How to set height of JTable Header and set the text to another size ?
You can set the font of the header as you can for any component. The font will dictate the preferred height of the header. If you don't like the preferred height, you can set that as well.
// add table to a scroll pane or the header will not appear
JTable table = new JTable(...);
container.add(new JScrollPane(table));
// get a reference to the header, set the font
JTableHeader header = table.getTableHeader();
header.setFont(new Font(...));
// set the preferred height of the header to 50 pixels.
// the width is ignored by the scroll pane.
header.setPreferredSize(new Dimension(1, 50));Mitch Goldstein
Author, Hardcore JFC (Cambridge Univ Press)
[email protected]
Similar Messages
-
How to set background of jtable in no data?
How to set background of jtable in no data?
I use table.setBackground(Color.black) but no successful
Please help me. thanks very muchmaybe, you don't understand me.
I have below jtable:
============================
I column1 name l column2 name I
============================
l data l data l
============================
l data l data l
============================
XXX
============================
I wrote:
table.setBackground(Color.black) then only data area has black colour, but XXX area hasn't black colour.
How to XXX area also has black colour?
help me, thanks very much. -
How to add ComboBox in Jtable Header
Hello everyone,
I want to add a Combox box in JTable Header .Basically it works as central access to whole table e.g. by selecting delete row in combo box then it should delete the current selected row.If somebody has any idea please share it.
Thanks in advance.The individual headers are not Swing components and therefore do not respond to mouse events in the same way as Swing components. Why don't you just have a popup menu that is positioned over the currently selected row? If you want to apply an action to all selected rows then have a set of buttons placed above the table header.
-
How to set and pass a Header Varible in Jsp
Hi ,
I am using Headervariable login module(which takes user id form http header variable) for single sign on.
I configured the login module stack. But to test i need a jsp from which i can pass the user id in http header.
to test if i am able to set the user id in http header , i have written 2 jsps
1. Header.jsp
In this , i am setting the user id
response.addHeader("UserId" ,"user1");
and i am posting it to HeaderResult.jsp
2.HeaderResult.jsp
In this, i am tryng to rretrieve it By using
request.getHeader("UserId");
But i am not geeting any value.
Can i set user defined header variables?if not, can i set the standard http header variabes,
Please help me with the code.
Thanks,
LakshmiHi Deltev,
Yes it will be lost, should i use request.servervariable(Http_userid)?
The Headeresult.jsp is only to test if i am able to set the header .
Actaully ,from Header.jsp i am calling the portal(Login module stack configured to HeaderVaribleLogin).
the poratl expects the userid from Http Header from jsp i need to send this in header.
How do i do this. I am missing something while passing the userid in header.
Please lete me know.
Thanks,
Lakshmi -
How to set height of XControl?
Hello,
I want to set the height of xcontrol,but there is a problem when I try to set it by property node of xcontrol container bounds height. Top and bottom of my control show incomplete.
So,how to set the height of XControl correctly?
Thank you!
Solved!
Go to Solution.Attached you can find a small example how to get it to work. Please note that i limit the smallest value to 40 because lower heights lead to graphical issues when resizing to larger values again.
So you can see that there are limitations to resizing of XControls depending on the facade of the XControl.
hope this helps,
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Attachments:
Resize XControl.vi 10 KB -
How to set the default screen header structure of PA30?
Hi,
I am not talking about the screen header of a particular infotype, e.g. IT0002. I have managed to change the header for any infotype by changing the structure of relevant screen header modifier.
The question is, how to change the screen header at the initial screen of PA30?
Because all settings in table V_582A_B are with an infotype number. No idea about how to change the default sreen header.
thanks in advance.PA20 / PA30 Initial screen always maps to screen header '00' even if it's not in V_582A_B. Therefore, if you have an infotype currently maps to screen header '00' and plan to have initial screen header to be different than the header of this infotype, you'll need to re-configure this infotype to map to a different screen header.
Rgds. -
ADF Faces: how to set height of af:panelBorder to be % of screen height
Hi,
I am having hard time setting height of af:panel to be a percentage of screen height. Using inlineStyle, I tried the following but it doesn't work:
<af:panelBorder inlineStyle="height:90.0%;">
Any thoughts?
Thanks
Message was edited by:
samsamHi,
not sure skinning can help here. There is no property on the dialog
Frank -
How to set height panelCollection
hello all
i have problem with UI, i can't set height panelCollection to full height in my page, and i have change StyleClass to AFStretchWidth/ AFStretchHeight
this below structure in my project file
template.jspx facet
panelGroupLayout
panelHeader
panelCollection
popup
anyone help :)
thx gan
agungdmtYour PanelCollection is not stretched because neither PanelGroupLayout nor PanelHeader stretch its children. Either the PanelCollection has to be the root component or the whole hierarchy above it should be of components that stretch their children (for example, center facet of PanelStretchLayout, DecorativeBox, PanelSplitter, ShowDetailItem(stretch), etc.). Have a look here for more details:
http://download.oracle.com/docs/cd/E14571_01/web.1111/b31973/af_orgpage.htm#CDEFAFGJ (See the last 2 columns in the table)
http://download.oracle.com/docs/cd/E14571_01/web.1111/b31973/af_orgpage.htm#CDEECCJF
http://download.oracle.com/docs/cd/E14571_01/web.1111/b31973/af_orgpage.htm#CACHIIAE
Dimitar -
How to set the border of header of JTable
I am using the following code to set the border of my JTable headers but it doesn't seem to work!! The headers do get CENTER aligned but somehow they do not show the right border. Please Help.
class cellAlignRenderer extends DefaultTableCellRenderer
cellAlignRenderer()
setHorizontalAlignment(JLabel.CENTER);
Border b = BorderFactory.createEtchedBorder() ;
setBorder(b);
jTable.getColumn(0).setHeaderRenderer( new cellAlignRenderer());try this
public class YourTableHeaderRenderer extends DefaultTableCellRenderer
public YourTableHeaderRenderer()
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
JLabel comp = (JLabel) super.getTableCellRendererComponent(table,value,
isSelected,hasFocus,row,column);
try
comp.setBorder(BorderFactory.createBevelBorder(0,Color.lightGray,Color.darkGray));
setFont(new java.awt.Font("Dialog", 0, 15));
setHorizontalAlignment(SwingConstants.CENTER);
catch(Exception err)
err.printStackTrace();
return this; -
How to Set UserId in Http Header for SSO?
Hello All,
I have a requirement to set the userid into the HTTP Header so that i can use the "Header Variables for User Authentication" module provided by SAP to achieve the SSO .
Could some 1 let me know how can I achieve this? I know abt the HTTPServlet.setheader() method, But i need to set it using my JAVA application. Is there any way to set the HTTP Header using Java. I have already done a lot of googling, but havent got any results.
I am sure that, there must definitely be a way in which we can add the user id into the HTTP header, in all the results, they tell abt adding it using the HTTP Servlet or PHP and so on, but i need to add it from JAVA.(setting REMOTE_USER as "mysapuserid")
I have already added the "HeaderVariableLoginModule" in my login stack in the 2nd position, as per
http://help.sap.com/saphelp_nw04/helpdata/en/8f/ae29411ab3db2be10000000a1550b0/frameset.htm
Any pointers will be helpful,
Meghana
Edited by: Meghana Phadke on Apr 14, 2008 2:49 PMHi
As I understand, your java application is an EP client, check framework HttpClient :
http://hc.apache.org/httpclient-3.x/
http://hc.apache.org/httpclient-3.x/tutorial.html
Hope this help
Jakub Krecicki -
How to set wsse:security SOAP header in soa 11g?
Hi,
we are facing an issue with invoking a secured webservice.
we tried 3 things
1.) set the username/password in em under reference properties
2.) Created a schema, set the username/password and included it in partner link header tab.
3.) added a client token policy in em and then set http authentication field.
all these not working.
the error we are facing is :
Non Recoverable System Fault :
javax.xml.ws.soap.SOAPFaultException: Missing <wsse:Security> in SOAP Header
complete payload is below:
<bpelFault>
<faultType>0</faultType>
<remoteFault>
<part name="summary">
<summary>Missing <wsse:Security> in SOAP Header</summary>
</part>
<part name="detail">
<detail>javax.xml.ws.soap.SOAPFaultException: Missing <wsse:Security> in SOAP Header</detail>
</part>
<part name="code">
<code>wsse:InvalidSecurity</code>
</part>
</remoteFault>
</bpelFault>
Please let us know how to proceed with this?
Thanks in advance
RegardsYou need to attach the below policy in security section (Select your partnerlink in the references section of composite.xml and the click on "Configure WS policies")
oracle/wss_username_token_client_policy
if it is Secured Webservice, then attach this policy
oracle/wss_username_token_over_ssl_client_policy
After attaching policy, click edit and configure the key(out of box, u see one key csf-key) . This key should be setup with the required username and password that matches with the Webservice expected username and pwd.
Thanks,
Satish
http://soadiscovery.blogspot.com -
How to set height of a JPanel ?
Hi.
My JPanel is a tad too high and I'd rather not use
mypanel.setPreferredSize(int xxx, int yyy)
because the breadth is alright.
How do I play around with the height only?
Something like
myjpanel.setHeight(int yyy);
would be nice but the method deoesn't exist.
:-)Set the minimum size and maximum size as well, to force it to work no matter what the layout manager is. You can set the minimum width to something like 1 and the maximum to 2000 to ensure it works properly if the window is resized, but make sure the minimum height is the height you want. The dimensions are in pixels by the way.
-
How to set query title or heading
Hi,
How can I set the query title or query heading. And also how can I creat text variable for query description.
Thank you
JoeHi Joe,
First, you can define query description when you first time save it. Then you can change it in query properties. But in the latter case the query description will be changed during the run time. When you select the query when you open it, the description will be original.
Best regards,
Eugene -
How to set alignment of ALV heading.
Hi Experts,
In a ALV report I have created a Heading I want this heading to be displayed in the centre How to do this.
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
/// I want this heading to be in centered/////
Heading 'Relicance Energy Limited
wa_header-typ = 'H'.
wa_header-info = text-001.
APPEND wa_header TO t_header.
CLEAR wa_header.
IF p_bp_ty = 1.
Premium value customer
wa_header-typ = 'S'.
wa_header-info = text-002.
APPEND wa_header TO t_header.
CLEAR wa_header.
ENDIF.
IF p_bp_ty = 2.
High value customer
wa_header-typ = 'S'.
wa_header-info = text-003.
APPEND wa_header TO t_header.
CLEAR wa_header.
ENDIF.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header
i_logo = 'RELMR'.
Fast response will be highly rewarded
Regards
BikasCheck this Blog,
This is using the LVC Function module.
/people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers -
How to set height of af:inputListOfValues
Is there any way I can set the height of af:inputListOfValues?
Thanks,Hi,
not sure skinning can help here. There is no property on the dialog
Frank
Maybe you are looking for
-
How do I save a photo I lightroom 5?
I am trying to save an edited photo in Lightroom 5 so I can work on it in elements 12
-
Dashed border around any component
Sorry if this a stupid question since I am very new to Flex. But, I cannot set the dashed or dotted border around mx:Canvas (or any other component for that matter). borderStyle allows only four settings: solid, inset, outset and none. Is there any e
-
Roaming Profile is roaming AppData\Local and AppData\LocalLow including Outlook OST file
Hi everyone. Well my problem with Roaming Profiles here is the AppData\Local and AppData\LocalLow directories are roaming when I believe they should not. I see these folders are kept from roaming by default within the policy. I am concerned because w
-
Xml.processFieldNames limitations
We are having some problems using the content conversion on the JMS adapter. Our legacy system sends fixed-width records to us via MQ series. Each record can contain hundreds of fields, also fixed-width. Although we are able to set up simple parsi
-
Can't buy more storage on iCloud
I can't buy more storage on iCloud I do not own a computer