Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~6K People Reached
About Me

A simple guy with lots of complexities. Music is life for me, Music is the destructive meditation and nurturing alcohol for me. Music & Terminals (Computers) are my world.

Favorite Forums
Favorite Tags
java x 45
c x 2
Member Avatar for soham.m17
Member Avatar for soham.m17

I want some **Logical** algorithm to get all possible combination of given string except the palinadromes. Like Input is: ABC OutPut: A,B,C,AB,AC,BC,ABC,ACB,BCA,BAC It can't contain CBA,CAB as it already has ABC,BAC i.e reverse of those. I want to get it done by boolean logic and but it is no where …

Member Avatar for stultuske
0
282
Member Avatar for soham.m17

I have a panel(JPanel) and it has FlowLayout by default. It has no preferredsize. I have a JScrollPane. So When I am adding buttons to the panel, the buttons are horizontally added. I want that to be added vertically. panel = new JPanel(); JButton clearButton = new JButton("CLEAR"); panel.add(button); JScrollPane …

Member Avatar for JamesCherrill
0
131
Member Avatar for soham.m17

How can I keep the lines that have been drawn previously after calling repaint() this is my paintComponent public void paintComponent( Graphics g ) { graphics2D = (Graphics2D)g; graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); graphics2D.setPaint(Color.white); graphics2D.fillRect(0, 0, getSize().width, getSize().height); graphics2D.setColor(Color.black); } I've another method public void show_line(line a) { graphics2D=(Graphics2D)this.getGraphics(); for(int i=1;i<a.getLine_segs().size();i++) { Point …

Member Avatar for soham.m17
0
210
Member Avatar for soham.m17

JLabel[] x=new JLabel[10]; int i=0; for(component comps : a.getComponent_list()) { x[i]=comps.getType().getImg(); x[i].setBounds(comps.getPosition().x, comps.getPosition().y, comps.getType().getWidth(), comps.getType().getHeight()); System.out.println("Coming Here,"+comps.getId()+","+comps.getPosition().x); this.add(x[i]); i++; } repaint(); I want to have all the labels in their position. after this function. but only the last added label is shown. What can I do?

Member Avatar for soham.m17
0
711
Member Avatar for soham.m17

Suppose below is my code : public void paintComponent( Graphics g ) { graphics2D = (Graphics2D)g; graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); graphics2D.setPaint(Color.white); graphics2D.fillRect(0, 0, getSize().width, getSize().height); graphics2D.setColor(Color.black); } and graphics2D is global variable declared like : private Graphics2D graphics2D; Now, how can I access g to draw lines from other methods? When I'm …

Member Avatar for NormR1
0
95
Member Avatar for soham.m17

I want to add a Lable in a JComponent when a button will be clicked. I have added a actionlistner on that button. I've added this.add(label) in the JComponent. but the location, which is set by label.setLocation(...) is not maintained in the JComponent. If i use FlowLayout() in the JComponent …

Member Avatar for JamesCherrill
0
118
Member Avatar for soham.m17

I want to add a selectable image to a PadDraw() of a JFrame container. So how can I do it? I've got a idea that it can be done by JLabel, but I think it's not selectable. So, how can I add that?

Member Avatar for soham.m17
0
99
Member Avatar for soham.m17

I'm using ArrayList. But the problem is that the indexOf function is not working in a for loop. It's showing 0 for all the elements or objects. Code goes like that for a FOR loop : [CODE]for(or_data or : counts.or_gates) { if (or.isHit(x, y)) { mutual=counts.or_gates.indexOf(or); set_move_cursor(); or.addX(dx); or.addY(dy); System.out.println("Got …

Member Avatar for soham.m17
0
217
Member Avatar for soham.m17

I am building a Circuit Editor using Java. I'm now at very first stage. Now I'm building a simple editor like Paint. I've implemented a drawing-pad where you can draw straight line and continue the line until you click an right click, by a "WIRE" Button click in the frame. …

Member Avatar for soham.m17
0
4K