34 Discussion / Question Topics

Remove Filter
Member Avatar for JamesCherrill

Hi Guys. I knw what I want to achieve but not how to achieve it! Any hints would be gratefuly received, or, if it's not possible, tell me so I can stop trying. I have an internet connection -> router with NAT, DHCP etc -> LAN with all kinds of …

Member Avatar for Malkovich
2
2K
Member Avatar for JamesCherrill

Hi Guys. I'm getting bored, and so I'm looking at Python for a new challenge. I hoped to be able to use my Java NetBeans IDE to avoid an IDE learning curve, but it seems that NetBeans support for Python died years ago. So, all you Python gurus... what do …

Member Avatar for Reverend Jim
2
1K
Member Avatar for JamesCherrill

At the risk of making a total fool of myself... I got very excited when I discovered that Java's "only opaque rectangular windows" limitation has been removed. Full release is intended for Java 7, but working methods can be accessed thru com.sun.awt.AWTUtilities in recent releases of Java 6 (I'm using …

Member Avatar for Reverend Jim
2
1K
Member Avatar for JamesCherrill

I'm asking this question in the context of a satellite internet service with expensive download limits... If you just accept all the recommended updates for Windows 10 (creator's update, security etc) for a single Home Edition machine how many Gigabytes will that represent in a typical 12 month period? Eg: …

Member Avatar for Ron Peters
0
4K
Member Avatar for JamesCherrill

OK, so I'm gereatric and have fading eyesight, but light typeface in light grey on white? Serioudsly: constructive requests vfor the topics summary page: 1. Show the name of the OP 2. Bring back the click to go straight to the laest post in a topic 3. Use sensible colours …

Member Avatar for rproffitt
2
907
Member Avatar for JamesCherrill

Praises be to the gods! Just when I thought all hope was lost, not just one but two proper Java questions. Maybe the road to recovery starts here?

Member Avatar for mysunindia
0
370
Member Avatar for JamesCherrill

Hi Guys. This is a seemingly simple problem that's got me stuck, so I'd be very grateful for any ideas you can offer. I'm working on a program that has to display fixed nodes and the links between them. The links are uni-directional, but often pairs of nodes have two …

Member Avatar for ddanbe
0
532
Member Avatar for JamesCherrill

Hi all you php buffs. Out of simple curiosity I thought I would take a look at php. I've been programing since I joined IBM as a trainee developer in 1969, so I have some familiarity with programming in (eg) 360 assembler, APL. PL/I, ... , Smalltalk, Java, Swift. (I …

Member Avatar for JamesCherrill
0
465
Member Avatar for JamesCherrill

Dani: Out of curiosity I tried clicking the RollBar ads in Programming and in Community Center.. When I clicked the one at the top of the page it just refreshed the page but without that ad. When I clicked the one half way down it just refreshed my window. I …

Member Avatar for JamesCherrill
0
387
Member Avatar for JamesCherrill

Assertnull and I have cooked up a little Java utility that we think will be useful for early-stage beginners, and I'm planning to post it for anyone to use. Is there some preferred short copyright/ownership/licence statement that I should include at the start of the code? I know that Daniweb …

Member Avatar for JamesCherrill
0
309
Member Avatar for JamesCherrill

I'm looking for an algorithm, pseudocode or any langauge, to generate random numbers with the following characteristics: integer values in the range 0-n lower values much more likely to happen than higher values, eg prob of 0 is n/(n(n-1)), prob of n is 1/(n(n-1)) - linear relationship between value and …

Member Avatar for invisal
1
669
Member Avatar for JamesCherrill

I've opened this thread following rotten69's suggestion for "Java projects for beginners". To get things started I've posted a project in a format that makes sense to me; please feel free to follow that format, or to do it in some completely different style if that seems better. Let's see …

Member Avatar for Alok_5
20
3K
Member Avatar for JamesCherrill

[This article](http://lifehacker.com/the-top-programming-languages-ranked-by-job-demand-po-1601752302) will give you at least one good reason...

Member Avatar for <M/>
1
334
Member Avatar for JamesCherrill

Although layout managers usually scale text properly, with the spread of "retina" Macs with screen resolutions over 200 d.p.i. we can't just keep ignoring pixel size for grahics or animation. Toolbox has a method for getting the screen resolution, but I don't have access to enough varied machines to see …

Member Avatar for Slavi
0
196
Member Avatar for JamesCherrill

This is my 10,000th post in the DaniWeb Java forum. so I hope I won't get an infraction for being off-topic. I just thought this would be the perfect opportunity to thank all the people who have helped to make this such a valuable and rewarding experience for me. I …

Member Avatar for peter_budo
6
241
Member Avatar for JamesCherrill

I have a bizarre thing just happened in NetBeans - the red error markers on the LHS of the editor window have all vanished. There are still errors - the files are flagged as having errors, and the errors are correctly diagnosed when I do a clean/rebuild, but no error …

Member Avatar for JamesCherrill
0
305
Member Avatar for JamesCherrill

I know this is going to be really simple, and I'm going to look like a fool when someone answers it, but... I'm tryingto replace any occurrenxe of any of these characters - ?_ with a * in a String I start with replaceAll("[ _-]", "*"); and all is well …

Member Avatar for masijade
1
237
Member Avatar for JamesCherrill

Firefox 21.0 on Windows 7 64bit, the menu of forums (fora?) across the top is corrupted - the Community Center menu doesn't fit and gets wrapped onto the next line. ![75fb4bfb66c2f19e631374a974745dcc](/attachments/small/1/75fb4bfb66c2f19e631374a974745dcc.PNG "align-left")

Member Avatar for Dani
0
178
Member Avatar for JamesCherrill

I'm suffering from a complete brainfreeze here; maybe some NetBeans user can un-block me without making me look like a complete idiot? Thanks. I usually use Eclipse, but for this particular project it has to be NetBeans. I have two projects defined. One is the main project with packages - …

Member Avatar for JamesCherrill
0
280
Member Avatar for JamesCherrill

Java SE JRE 7 update 21 is now available, with fixes for dozens of security-related issues. Immediate installation is highly recommended. Head on over to Oracle's Java download page and grab it now. There is also a version for Java 6 users, if any such animals still exist.

Member Avatar for jwenting
2
181
Member Avatar for JamesCherrill

Here's a simple thing that I can't find a simple solution for - so any suggestions will be very welcome... I have a `Map<String, MyClass>` and if it has more than 1 entry I let the user pick a MyClass instance by displaying the keys. No problem there. If it …

Member Avatar for JamesCherrill
2
344
Member Avatar for JamesCherrill

Just a quick heads-up, especially for anyone using Java in their web browser. There's a "widely exploited" vulnerability in Java that could allow bypassing normal security when a Java applet is run silently upon visiting a web site. (ie It's a bad one). Users are being widely advised to disable …

Member Avatar for harinath_2007
3
177
Member Avatar for JamesCherrill

Hello all. I'm currrently working on a GUI that needs to support dragging some application-specific objects from a selection area onto a work area (JPanel). It's currently working in a "click where to place the object, then click the Add button" mode, but that's not good enough. The obvious approach …

Member Avatar for JamesCherrill
2
1K
Member Avatar for JamesCherrill

I'm curious. Why is so much code in this forum formatted like this [CODE]if (something) { do something } else { do another thing }[/CODE] rather than [CODE]if (something) { do something } else { do another thing }[/CODE] The first version is harder to read and takes up more …

Member Avatar for JamesCherrill
0
379
Member Avatar for JamesCherrill

Like me you may be curious about the "closures" or "lambda expressions" that were supposed to be in Java 7 and are now the centre-piece of Java 8 (due next year). Also like me you may have Googled for some info, and discovered a smattering of technical articles explaining the …

Member Avatar for JamesCherrill
0
170
Member Avatar for JamesCherrill

Maybe it's just me having a "senior moment", but we seem to have lost the facility where you could hover the mouse over a topic's title on the forum listing page and see the first line or two of the post. I used this all the time to get a …

Member Avatar for Dani
2
191
Member Avatar for JamesCherrill

What (if anything) is the difference between these two? [CODE]String[] sa = {"ABC"}; String[] sa = new String [] {"ABC"};[/CODE]

Member Avatar for JamesCherrill
0
183
Member Avatar for JamesCherrill

The sort methods for collections specifies that the parameter must be a collection of objects that implement Comparable for their own class or superclass, eg [CODE]public static <T extends Comparable<? super T>> void sort(List<T> list)[/CODE] Can anyone tell me how to define an ArrayList that will only accept such objects? …

Member Avatar for ~s.o.s~
0
187
Member Avatar for JamesCherrill

Just a heads-up guys. I had JRE update 26 pushed onto client machines yesterday and it broke an important client-server app. This point release changes the serialVersionUID for ImageIcon. The app in question sends images from the server to the cients via a simple writeObject/readObject, which fails at the client …

Member Avatar for Don Corley
1
570
Member Avatar for JamesCherrill

Hi y'all. I'm looking for feedback and discussion on the use of annotations to eliminate the boilerplate code for linking buttons and methods. Hopefully this will be especially useful in RAD or rapid prototyping environments. Over the weekend I hacked together a little proof of concept that supports two ways …

Member Avatar for JamesCherrill
0
206
Member Avatar for JamesCherrill

I have a problem involving Generics. Here's a simplified version: Suppose I have a generic method to add a new element to a (possibly empty) ArrayList, like this: [CODE]<T> void addNewTo(ArrayList<T> list)[/CODE] What I need to do is to determine the correct class for the ArrayList elements so as to …

Member Avatar for JamesCherrill
0
192
Member Avatar for JamesCherrill

Suns Java style rules specify that accessors should follow the getX/setX pattern, and most Java API mathods follow this... except for some very common exceptions such as: String length() enum name() [NB new to 1.5, not a legacy!] ArrayList size() etc It seems that there is another pattern operating here: …

Member Avatar for JamesCherrill
0
159
Member Avatar for JamesCherrill

OK, I'm obviously going bonkers here, but has something happened to the java code tags? Why doesn't this work in preview mode? [CODE=java] i++; [/CODE]

Member Avatar for JamesCherrill
0
157
Member Avatar for JamesCherrill

Here's a question for those of you who have experience of fixing or enhancing other people's Java code, which I hope will also be really useful for those in the early stages of learning programming. Please contribute! If you've looked at other people's code, you will know that sinking feeling …

Member Avatar for JamesCherrill
0
105

The End.