hi ,
as i said in title i wanna do dynamic jtabbedpane .. for example ;
JTabbedPane tabbedPane = new JTabbedPane();
ImageIcon icon = createImageIcon("images/middle.gif");
JComponent panel1 = makeTextPanel("Panel #1");
tabbedPane.addTab("Tab 1", icon, panel1,"Does nothing");
i can dynamically adding tabs to tabbedpane container.But pr...
I would like to render the same JSP for multiple Struts Actions. I'm having trouble because when rendering the JSP, the bean name is different depending on which Action was called. So, I can't call something like:
<c:out value="${myBean.myProperty}" />
because the bean isn't necessarily called myBean.
Currently, I've been getting ar...
Spring-WS generates WSDL without operations in binding tag... Do you know why?
There is my spring-ws-service.xml:
<import resource="classpath*:application-context.xml" />
<!-- Register PayloadRootAnnotationMethodEndpointMapping -->
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpo...
I want to replace the question mark (?) in a string with some other words. What is the regular expression for question mark.
For example, I want to replace question mark in "word=?" to something else, say "stackoverflow". Then the result would be "word=stackoverflow".
What is the syntax in java?
...
I've been trying and failing to use the java full screen mode on the primary display of an OSX system. Whatever I've tried I can't seem to get rid of the 'apple' menu bar from the top of the display. I really need to paint over the entire screen. Can anyone tell me how to get rid of the menu?
I've attached an example class which exhi...
We're refactoring a long method; it contains a long for loop with many continue statements. I'd like to just use the Extract Method refactoring, but Eclipse's automated one doesn't know how to handle the conditional branching. I don't, either.
Our current strategy is to introduce a keepGoing flag (an instance variable since we're goin...
Hopefully the title isn't too cryptic ...
The problem we have is that we generate a bunch of input controls (h:inputOneMenu, h:inputText etc) from some Java List.
Works fine EXCEPT the requirement is that these inputs validate on the fly. Again not so hard except that as there controls were generated in a loop the only possible reRende...
Hey there,
I'm planning on starting a web project, and I've been searching for the best option. Ultimately I choose to stick with Java + Seam + J Boss AS + JPA Hibernate.
But regarding URL Rewriting its been a really long run, without many accomplishments.
I'll have a hierarchical structure, Ex. Category -> Sub-category -> Sub-sub-cat...
Hi,
I'm a .NET programmer doing some Hadoop work in Java and I'm kind of lost here. In Hadoop I am trying to setup a Map-Reduce job where the output key of the Map job is of the type Tuple<IntWritable,Text>. When I set the output key using setOutputKeyclass as follows
JobConf conf2 = new JobConf(OutputCounter.class);
conf2.setOutputKey...
If I kill the Socket Server process, my Socket client process does not receive any errors, it continues to loop forever on the following code:
public void run() {
while(readData) {
String inputLine = null;
try {
while((inputLine = m_inputStream.readLine()) != null) {
//do stuff
}
} catch (...
I have a java program that will work with a variety of Java Beans. I'm interested in displaying a "property sheet" that will show the fields and methods for the bean from BeanInfo and/or reflection. It could also update the information from the bean.
Is there a built-in way of creating these property sheets? I was thinking something ...
I'm trying to write a restful web service in java that will take a few string params and a binary file (pdf) param.
I understand how to do the strings but I'm getting hung up on the binary file. Any ideas / examples?
Here's what I have so far
@GET
@ConsumeMime("multipart/form-data")
@ProduceMime("text/plain")
@Path("submit/{client_id...
How do I formate a java.sql Timestamp to my liking ? ( to a string, for display purposes)
...
How do i get all classes within a package?
...
GWT RPC is proprietary but looks solid, supported with patterns by Google, and is mentioned by every book and tutorial I've seen. Is it really the choice for GWT client/server communcation? Do you use it and if not why and what you chose? I assume that I have generic server application code that can accommodate for RPC, EJBs, web servic...
I have checked the validator source code and the examples of user-defined rule in the book "Jakarta Struts Live." When people define validator rules in validator-rules.xml, the following declaration for "methodParams" seems to be the only choice:
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAc...
hi,
I have this log4j configuration in my grails config.groovy
log4j = {
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages' // GSP
warn 'org.mortbay.log'
appenders {
rollingFile name:'infoLog', file:'info.log', threshold: org.apache.log4j....
/*/ comment here
do some thing.
/*/
do some thing.
//*/
Why people write code like that? Is this a good practice?
...
Hi
I have PCM samples in a short array. What is the best way to play this out?
The format is 8000Hz, Mono, 16 bit, big endian.
(The PCM samples are generated in the code and not read through some file)
Thanks
...
Hi , i have a written a J2ME application which uses Bluetooth and search a file within the peer mobile and download it . I would like to make my application run in background , when ever i get a call , or message and later resume after few seconds , Has anybody worked on this please share your experience . Is there any way to run a Midle...